Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualwhitenose

Posted 08 October 2012 - 03:14 PM

I don't really know Java, but I don't see any obvious bugs in the code you posted.

It's easier to get things right by adopting the negamax convention (in every node positive score means good for the player to move, so you flip the sign of the result of the recursive call and treat every node as a max node).


Thank you for replying mr. alvaro.
The algorithm should be the same, and it looks ok to me so far also ... but i still dont get it Posted Image
Why it returns some invalid moves when depth is greater or equal than 3 (i.e depth >= 3) ??

With depth>2 the algorithm should "see" ahead further moves and return them.
I only get moves from "player"'s team (not the "computer" team as it should).

But with depth = 1 or 2 all is just Fine ! (it returns best board/move from all of possible boards'/moves)
But this has a disadvantage: it cannot anticipate further moves of the "player" . Only the "power" of the evaluateBoard() function is used then (a local board evaluation).

#5whitenose

Posted 08 October 2012 - 03:14 PM

I don't really know Java, but I don't see any obvious bugs in the code you posted.

It's easier to get things right by adopting the negamax convention (in every node positive score means good for the player to move, so you flip the sign of the result of the recursive call and treat every node as a max node).


Thank you for replying mr. alvaro.
The algorithm should be the same, and it looks ok to me so far also ... but i still dont get it Posted Image
Why it returns some invalid moves when depth is greater or equal than 3 (i.e depth >= 3) ??

With depth>2 the algorithm should "see" ahead further moves and return them.
I only get moves from "player"'s team (not the "computer" team as it should).

But with depth = 1 or 2 all is just Fine ! (it retuns best board/move from all of possible boards'/moves)
But this has a disadvantage: it cannot anticipate further moves of the "player" . Only the "power" of the evaluateBoard() function is used then (a local board evaluation).

#4whitenose

Posted 08 October 2012 - 03:13 PM

I don't really know Java, but I don't see any obvious bugs in the code you posted.

It's easier to get things right by adopting the negamax convention (in every node positive score means good for the player to move, so you flip the sign of the result of the recursive call and treat every node as a max node).


Thank you for replying mr. alvaro.
The algorithm should be the same, and it looks ok to me so far also ... but i still dont get it Posted Image
Why it returns some invalid moves when depth is greater or equal than 3 (i.e depth >= 3) ??

With depth>2 the algorithm should "see" ahead further moves and return them.
I only get moves from "player"'s team (not the "computer" team as it should).

But with depth = 1 or 2 all is just Fine ! (it retuns best board from all of possible boards')
But this has a disadvantage: it cannot anticipate further moves of the "player" . Only the "power" of the evaluateBoard() function is used then (a local board evaluation).

#3whitenose

Posted 08 October 2012 - 03:12 PM

I don't really know Java, but I don't see any obvious bugs in the code you posted.

It's easier to get things right by adopting the negamax convention (in every node positive score means good for the player to move, so you flip the sign of the result of the recursive call and treat every node as a max node).


Thank you for replying mr. alvaro.
The algorithm should be the same, and it looks ok to me so far also ... but i still dont get it Posted Image
Why it returns some invalid moves when depth is greater or equal than 3 (i.e depth >= 3) ??

With depth>2 the algorithm should "see" ahead further moves and return them.
I only get moves from "player"'s team (not the "computer" team as it should).

But with depth = 1 or 2 all is just Fine !
But this has a disadvantage: it cannot anticipate further moves of the "player" . Only the "power" of the evaluateBoard() function is used then (a local board evaluation).

#2whitenose

Posted 08 October 2012 - 03:12 PM

I don't really know Java, but I don't see any obvious bugs in the code you posted.

It's easier to get things right by adopting the negamax convention (in every node positive score means good for the player to move, so you flip the sign of the result of the recursive call and treat every node as a max node).


Thank you for replying mr. alvaro.
The algorithm should be the same, and it looks ok to me so far also ... but i still dont get it Posted Image
Why it returns some invalid moves when depth is greater or equal than 3 (i.e depth >= 3) ??

With depth>2 the algorithm should "see" ahead further moves and return them.
I only get moves from "player"'s team (not the "computer" team as it should).

But with depth = 1 or 2 all is just Fine !
But this has a disadvantage: it cannot anticipate further moves of the "player" . Only the "power" of the evaluateBoard() function is used then (local boar eval).

#1whitenose

Posted 08 October 2012 - 03:11 PM

I don't really know Java, but I don't see any obvious bugs in the code you posted.

It's easier to get things right by adopting the negamax convention (in every node positive score means good for the player to move, so you flip the sign of the result of the recursive call and treat every node as a max node).


Thank you for replying mr. alvaro.
The algorithm should be the same, and it looks ok to me so far also ... but i still dont get it Posted Image
Why it returns some invalid moves when depth is greater or equal than 3 (i.e depth >= 3) ??

With depth>2 the algorithm should "see" ahead further moves and return them.
I only get moves from "player"'s team (not the "computer" team as it should).

But with depth = 1 or 2 all is just Fine !
But this has a disadvantage: it cannot anticipate further moves of the "player" . Only the "power" of the evaluateBoard() function is used then.

PARTNERS