CREATION OF AN INDEPENDENT CAMELOT-PLAYING COMPUTER PROGRAM
A successful independent Camelot computer program would contain three primary elements:
1. An effective interactive graphical interface including the playing surface and the pieces
2. Strict adherence to the playing rules
3. An algorithm to perform an accurate evaluation of positions
The following might provide some assistence with #3.
POSITION EVALUATION
Here's a first attempt at position evaluation. I welcome all suggestions on this element. Send them to Michael Nolan at
.
Basic Evaluation Factors
1. Relative values of a Knight and a Man.
2. Value of entering two pieces into opposing castle (winning the game) -- the third highest priority behind removing a piece from its own castle (the highest priority) and making a capture by means of a Jump or a Knight's Charge when an enemy piece is exposed to capture by means of a jump (the second highest priority).
3. Value of capturing all of opponent's pieces while retaining two of your own (winning the game)
4. Proximity to Opposing Castle
5. Number of squares controlled by each piece.
6. Values of trading like-valued pieces when ahead and trading like-valued pieces when behind
7. Proximity to center of board
8. Proximity of Pieces (Men or Knights) to Knights
9. Proximity of Men to Men
10. Exposure to a position where a piece is next to an exposed enemy piece but not exposed, itself, to the enemy piece (in other words, moving into a position where a jump on the next move will be mandatory.
11. Value of removing your piece from your own Castle.
12. Value of making a capture by means of a Jump or a Knight's Charge when an enemy piece is exposed to capture by means of a jump.
Here are some very arbitrary values assigned to each:
Assumption: Depending upon how many ply the look ahead is, whatever move-tree results in the most points is the chosen move.
1. Material:
P = total number of friendly uncastled Pieces after move
M = value of Man =100
K = value of Knight after move
N=12.27 N=14.68 N=16.09 N=17.09
P K P K P K P K
1 100.00 1 100.00 1 100.00 1 100.00
2 106.40 2 112.80 2 119.21 2 125.61
3 111.20 3 122.41 3 133.61 3 144.81
4 114.80 4 129.61 4 144.41 4 159.22
5 117.51 5 135.01 5 152.52 5 170.02
6 119.53 6 139.06 6 158.59 6 178.13
7 121.05 7 142.10 7 163.15 7 184.20
8 122.19 8 144.38 8 166.57 8 188.76
9 123.04 9 146.09 9 169.13 9 192.18
10 123.69 10 147.37 10 171.06 10 194.74
11 124.17 11 148.33 11 172.50 11 196.67
12 124.53 12 149.05 12 173.58 12 198.11
13 124.80 13 149.59 13 174.39 13 199.19
14 125.00 14 150.00 14 175.00 14 200.00
N=17.87 N=18.50 N=19.04 N=19.50
P K P K P K P K
1 100.00 1 100.00 1 100.00 1 100.00
2 132.01 2 138.41 2 144.81 2 151.22
3 156.02 3 167.22 3 178.43 3 189.63
4 174.02 4 188.83 4 203.63 4 218.44
5 187.53 5 205.03 5 222.54 5 240.05
6 197.66 6 217.19 6 236.72 6 256.25
7 205.25 7 226.30 7 247.35 7 268.41
8 210.95 8 233.14 8 255.33 8 277.52
9 215.22 9 238.27 9 261.31 9 284.36
10 218.43 10 242.11 10 265.80 10 289.48
11 220.83 11 245.00 11 269.16 11 293.33
12 222.63 12 247.16 12 271.69 12 296.21
13 223.99 13 248.78 13 273.58 13 298.38
14 225.00 14 250.00 14 275.00 14 300.00
The Knight value depends upon how many of its fellow pieces are still in play, as well as upon the N value chosen. (Iterations of Chaxx vs. Chaxx contests using different N values should determine the correct value of N, and therefore the correct formula, and the correct Knight-Man values.)
2. Castles: 2 pieces into opponent's Castle = 3,100 points (game win)
3. Elimination of all of opponent's pieces while retaining two or more friendly pieces = 3,000 points (game win)
4. Proximity to Opposing Castle: Each piece gets the following points for the rank it occupies:
rank occupied points
1 (own castle) 0
2 2
3 4
4 6
5 8
6 11
7 14
8 17
9 21
10 25
11 29
12 33
13 37
14 41
15 45
16 (opp’s castle) 0
(16th rank = 0 points because moving ONE piece into opposing castle is a weak move unless you can move two pieces in)
5. Each square controlled by each piece = 1 point. (e.g., five pieces controlling 8 squares each = 40 points.) "Controlled By" means each square able to be moved to by a legal move, whether by Plain Move or Canter or canter portion of a Knight's Charge, AND each square housing an enemy piece that could be jumped over, whether by Jump or jumping portion of a Knight's Charge.
6. Add to each position a factor of 400 points x total value of your pieces / total value of your opponent's pieces. So, for example, if you had 2 Knights and 3 Men, and your opponent had 2 Knights and 2 Men, you would add: 400 x (2 x 125 + 3 x 100) / (2 x 125 + 2 x 100) = 489 points but if you exchanged 1 Man for 1 Man you would have 2 Knights and 2 Men and your opponent would have 2 Knights and 1 Man, and you would add: 400 x (2 x 125 + 2 x 100) / (2 x 125 + 100) = 514 points, so you would gain 25 points for exchanging a Man for a Man.
The concept is that a position where you are ahead 4 Men to 3 Men is better than a position where you are ahead 5 Men to 4 Men, but worse than a position where you are ahead 3 Men to 2 Men. Conversely, a position where you are behind 3 Men to 4 Men is worse than a position where you are behind 4 Men to 5 Men, but better than a position where you are behind 2 Men to 3 Men. In other words, when ahead, trade pieces; when behind, avoid trading pieces.
7. Proximity to center of board: Each piece gets the following points for the file it occupies:
a file: 0 points
b file: 1 points
c file: 2 points
d file: 3 points
e file: 4 points
f & g files: 5 points
h file: 4 points
i file: 3 points
j file: 2 points
k file: 1 point
l file: 0 points
8. Proximity of Pieces to Knights: 5 points for each Piece (Man or Knight) adjacent (Vertically, Horizontally, or Diagonally) to a friendly Knight.
9. Proximity of Men to Men: 2 points for each Man adjacent (Vertically, Horizontally, or Diagonally) to a friendly Man.
10. Moving into a position where your piece is next to an exposed enemy piece but not exposed, itself, to the enemy piece (in other words, moving into a position where you're going to have to jump on the next move: -15 points. (This means a position where you can't be taken because you have another piece directly behind you but he can be taken because he doesn't.) Basically, if you move to where he doesn't have to jump you, but you're going to have to jump him next move, you're dead because he can position his other pieces dangerously and you're still going to have to jump next move.
11. Removal of piece from own castle: 6,000 points (mandatory)
12. Making a capture by means of a Jump or a Knight's Charge when an enemy piece is exposed to capture by means of a jump: 4,500 points (mandatory, except if #11 is possible).