Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAticAtac

Posted 27 September 2012 - 04:22 AM

Thanks for the help folks Posted Image

to test your search code, write a trivial game like tic-tac-toe and test it on that. that way you can see very quickly if it making obvoius mistakes.

Good idea, i will try that!

@alvaro
How did my code correctly with the source tag?
The "{code}" didn't work properly for me.

int check_win = CheckWin(board, eval, left); // <-- Why does this take a cEvaluation?

cEvaluation just contains information about number of remaining pieces for both side, etc. This is needed first time in the CheckWin() function and later in the Evaluation() function.

currentscore = -NegMax(board2, maxdepth, !left, -INFINITY, -bestmove.rating); // <-- Use "-alpha" instead of a fixed +INFINITY

You mean:
currentscore = -NegMax(board2, maxdepth, !left, -alpha, -bestmove.rating);
?

int score = eval.pirates_base * 5 + eval.pirates_outside * 4; // <-- You should be computing the number of figures for the player to move minus the number of figures for the opponent. This one-sided evaluation seems suspect.

I was doing this originally and the result was even stranger.
I know that the evaluation-function is probably the main component to focus on. This might by the real challenge to do this properly for this game.

You are welcome to play the game and brainstorm with me possible ways for the evaluation function Posted Image

Once again, thanks for your help!

#1AticAtac

Posted 27 September 2012 - 04:19 AM

Thanks for the help folks Posted Image

to test your search code, write a trivial game like tic-tac-toe and test it on that. that way you can see very quickly if it making obvoius mistakes.

Good idea, i will try that!

@alvaro
How did my code correctly with the source tag?
The "{code}" didn't work properly for me.

int check_win = CheckWin(board, eval, left); // <-- Why does this take a cEvaluation?

evaluation just contains information (number of remaining pieces for both side, etc.). This is needed first time in the CheckWin() function, so i am saving this information for later use: Evaluation() function.

currentscore = -NegMax(board2, maxdepth, !left, -INFINITY, -bestmove.rating); // <-- Use "-alpha" instead of a fixed +INFINITY

You mean:
currentscore = -NegMax(board2, maxdepth, !left, -alpha, -bestmove.rating);
?

int score = eval.pirates_base * 5 + eval.pirates_outside * 4; // <-- You should be computing the number of figures for the player to move minus the number of figures for the opponent. This one-sided evaluation seems suspect.

I was doing this originally and the result was even stranger.
I know that the evaluation-function is probably the main component to focus on. This might by the real challenge to this properly for this game.

You are welcome to play the game and brainstorm with me possible ways for the evaluation function Posted Image

Once again, thanks for your help!

PARTNERS