Don,
My AMAF version of housebot plays horribly. Is it possible to take a
look at how I interpreted what you said on implementing AMAF and see if
I have any details wrong? Below is both a description of what I do in a
paragraph (or so), and the code for my thinking logic (< 60 lines).
HouseBot is doing 7k-25k AMAF sims per move. The performance gap is way
larger than you'd expect for pure AMAF.
Current rating is 611?, I expect it to settle at about half that.
http://cgos.boardspace.net/9x9/cross/housebot-621-amaf.html
Dodo's ranking with only 64 AMAF sims is 759.
Here's the quick run down of what I do:
1. Play out a random game, saving every move
2. Compute how many moves to keep (typically, 5/8 of the moves in the
random game, min 1 move)
3. I quickly replay the game to mark who played in which spots first
(for only the first 5/8 of the plays).
4. Then, for each move by housebot, score it as a simulation and either
a win or a loss (loss is implicit as sims-wins)
5. (not shown below) After all simulations are done, compute wins/sims
for every legal point and pick the win rate as the move to play.
simplePosition nextStartingMove =
randomLegalMove(nextMoveColor, gb, twister);
if (nextStartingMove == singletonSimplePass)
return false;
color c = nextMoveColor;
simplePosition p = nextStartingMove;
const int keepMax = 1000;
simplePosition[keepMax] moves;
int numMoves = 0;
// Loop to do #1 above
while (p != singletonSimplePass){
if (numMoves < keepMax)
moves[numMoves] = p;
workingCopy.play(c,p);
c = c.enemyColor();
p = randomLegalMove(c, workingCopy, twister);
numMoves++;
}
// Code to do #2 above
color[simplePosition] firstColor;
const float keepFraction = 5.0/8.0;
int maxCacheMoves = cast(int) (numMoves * keepFraction);
if (maxCacheMoves == 0 && numMoves > 0)
maxCacheMoves = 1;
if (maxCacheMoves > keepMax)
maxCacheMoves = keepMax;
// Loop for #3 above
c = nextMoveColor;
for (int i=0; i<numMoves; i++){
p = moves[i];
if (i < maxCacheMoves && !(p in firstColor))
firstColor[p] = c;
c = c.enemyColor;
}
// One of two loops to do #4 above (based on if it's a
win or a loss)
if (isWin(nextMoveColor, workingCopy)){
foreach(simplePosition xp, color xc; firstColor){
if (xc == nextMoveColor){
wins[xp] = wins[xp] + 1;
sims[xp] = sims[xp] + 1;
}
}
}
else{
foreach(simplePosition xp, color xc; firstColor){
if (xc == nextMoveColor)
sims[xp] = sims[xp] + 1;
}
}
Jason House wrote:
I'm guessing that 110 means libego v0.110 (the latest posted online
for download)
I'm glad that you run all those different variants. I'm really
surprised that a simply 1-ply AMAF is doing that well. I'm certainly
doing far more simulations per move than ReadyFreddy and am barely
able to compete. I may have to try my own pure AMAF variant and see
how it does...
_______________________________________________
computer-go mailing list
[email protected]
http://www.computer-go.org/mailman/listinfo/computer-go/