•      Sign In
• Create Account

### #Actualwhitenose

Posted 21 October 2012 - 09:48 AM

Hello,
I'm sorry i keep coming back to this subject, but i have some issues wich i help you can give me an answer.
I have this EvalFunction :

[source lang="java"] public int evaluateBoard(int sign) // -1 = "computer" and +1 = "human" { int total = 0; int computer_closedmills = this.checkMills(-1); // count how many closed mills AI has (3 tokens in a row/column). int computer_openmills = this.checkFormers(-1); // count how many 2 in a row/column tokens AI has. int computer_blockers = this.checkBlockers(-1); // count if one AI token -> blocks 2 player's tokens int computer_tokensleft = this.checkTokens(-1); // count how many tokens AI has. int computer_openspaces = this.checkOpenSpaces(-1); // count how many move possibilities AI has (in current board) int player_closedmills = this.checkMills(1); // count how many mills "human" has int player_openmills = this.checkFormers(1); // count how many 2 in a row/column "human" has. int player_blockers = this.checkBlockers(1); // etc. int player_tokensleft = this.checkTokens(1); int player_openspaces = this.checkOpenSpaces(1); // compute total score total -= ((computer_closedmills * 20)+ (computer_openmills * 40) + (computer_blockers * 30) + (computer_tokensleft * 10) + (computer_openspaces*5)); total += ((player_closedmills * 20) + (player_openmills * 40) + (player_blockers * 30) + (player_tokensleft * 10) + (player_openspaces*5)); if(sign==-1) return total; else return -total; }[/source]

Ok, now i have this situation as you can see below represented in this Picture :

http://imageshack.us...notworking.jpg/

Note that red tokens represent "computer".
Instead of moving token 22 to position 19 (wich will form a new mill) , my evalFunction() makes another decision
and moves something let's say like token 21 to position 9 , or 18 to position 10.

Can you help me improve my eval function so that token 22 moves to 19 ?
( so that mill 21-22-23 breaks and token 22 forms a new mill on 18-19-20)

thanks !

### #4whitenose

Posted 21 October 2012 - 09:43 AM

Hello,
I'm sorry i keep coming back to this subject, but i have some issues wich i help you can give me an answer.
I have this EvalFunction :

[source lang="java"] public int evaluateBoard(int sign) // -1 = "computer" and +1 = "human" { int total = 0; int computer_closedmills = this.checkMills(-1); // count how many closed mills AI has (3 tokens in a row/column). int computer_openmills = this.checkFormers(-1); // count how many 2 in a row/column tokens AI has. int computer_blockers = this.checkBlockers(-1); // count if one AI token -> blocks 2 player's tokens int computer_tokensleft = this.checkTokens(-1); // count how many tokens AI has. int computer_openspaces = this.checkOpenSpaces(-1); // count how many move possibilities AI has (in current board) int player_closedmills = this.checkMills(1); // count how many mills "human" has int player_openmills = this.checkFormers(1); // count how many 2 in a row/column "human" has. int player_blockers = this.checkBlockers(1); // etc. int player_tokensleft = this.checkTokens(1); int player_openspaces = this.checkOpenSpaces(1); // compute total score total -= ((computer_closedmills * 20)+ (computer_openmills * 40) + (computer_blockers * 30) + (computer_tokensleft * 10) + (computer_openspaces*5)); total += ((player_closedmills * 20) + (player_openmills * 40) + (player_blockers * 30) + (player_tokensleft * 10) + (player_openspaces*5)); if(sign==-1) return total; else return -total; }[/source]

Ok, now i have this situation as you can see below represented in this Picture :

http://imageshack.us...notworking.jpg/

Note that red tokens represent "computer".
Instead of moving token 22 to position 19 (wich will form a new mill) , my evalFunction() makes another decision
and moves something let's say like token 21 to position 9 , or 18 to position 10.

Can you help me improve my eval function so that token 22 moves to 19 ?
( so that mill 21-22-23 breaks and token 22 forms a new mill on 18-19-20)

thanks !

@alvaro : correction made.(sorry)

### #3whitenose

Posted 21 October 2012 - 09:38 AM

Hello,
I'm sorry i keep coming back to this subject, but i have some issues wich i help you can give me an answer.
I have this EvalFunction :

[source lang="java"] public int evaluateBoard(int sign) // -1 = "computer" and +1 = "human" { int total = 0; int computer_closedmills = this.checkMills(-1); // count how many closed mills AI has (3 tokens in a row/column). int computer_openmills = this.checkFormers(-1); // count how many 2 in a row/column tokens AI has. int computer_blockers = this.checkBlockers(-1); // count if one AI token -> blocks 2 player's tokens int computer_tokensleft = this.checkTokens(-1); // count how many tokens AI has. int computer_openspaces = this.checkOpenSpaces(-1); // count how many move possibilities AI has (in current board) int player_closedmills = this.checkMills(1); // count how many "human" has int player_openmills = this.checkFormers(1); // count how many 2 in a row/column "human" has. int player_blockers = this.checkBlockers(1); // etc. int player_tokensleft = this.checkTokens(1); int player_openspaces = this.checkOpenSpaces(1); // compute total score total -= ((computer_closedmills * 20)+ (computer_openmills * 40) + (computer_blockers * 30) + (computer_tokensleft * 10) + (computer_openspaces*5)); total += ((player_closedmills * 20) + (player_openmills * 40) + (player_blockers * 30) + (player_tokensleft * 10) + (player_openspaces*5)); if(sign==-1) return total; else return -total; }[/source]

Ok, now i have this situation as you can see below represented in this Picture :

http://imageshack.us...notworking.jpg/

Note that red tokens represent "computer".
Instead of moving token 22 to position 19 (wich will form a new mill) , my evalFunction() makes another decision
and moves something let's say like token 21 to position 9 , or 18 to position 10.

Can you help me improve my eval function so that token 22 moves to 19 ?
( so that mill 21-22-23 breaks and token 22 forms a new mill on 18-19-20)

thanks !

@alvaro : correction made.(sorry)

### #2whitenose

Posted 21 October 2012 - 09:37 AM

Hello,
I'm sorry i keep coming back to this subject, but i have some issues wich i help you can give me an answer.
I have this EvalFunction :

[source lang="java"] public int evaluateBoard(int sign) // -1 = "computer" and +1 = "human" { int total = 0; int computer_closedmills = this.checkMills(-1); // count how many closed mills AI has (3 tokens in a row/column). int computer_openmills = this.checkFormers(-1); // count how many 2 in a row/column tokens AI has. int computer_blockers = this.checkBlockers(-1); // count if one AI token -> blocks 2 player's tokens int computer_tokensleft = this.checkTokens(-1); // count how many tokens AI has. int computer_openspaces = this.checkOpenSpaces(-1); // count how many move possibilities AI has (in current board) int player_closedmills = this.checkMills(1); // count how many "human" has int player_openmills = this.checkFormers(1); // count how many 2 in a row/column "human" has. int player_blockers = this.checkBlockers(1); // etc. int player_tokensleft = this.checkTokens(1); int player_openspaces = this.checkOpenSpaces(1); // compute total score total -= ((computer_closedmills * 20)+ (computer_openmills * 40) + (computer_blockers * 30) + (computer_tokensleft * 10) + (computer_openspaces*5)); total += ((player_closedmills * 20) + (player_openmills * 40) + (player_blockers * 30) + (player_tokensleft * 10) + (player_openspaces*5)); if(sign==-1) return total; else return -total; }[/source]

Ok, now i have this situation as you can see below represented in this Picture :

http://imageshack.us...notworking.jpg/

Note that red tokens represent "computer".
Instead of moving token 22 to position 19 (wich will form a new mill) , my evalFunction() makes another decision
and moves something let's say like token 21 to position 9 , or 18 to position 10.

Can you help me improve my eval function so that token 22 moves to 19 ?
( so that mill 21-22-23 breaks and token 22 forms a new mill on 18-19-20)

thanks !

### #1whitenose

Posted 21 October 2012 - 09:25 AM

Hello,
I'm sorry i keep coming back to this subject, but i have some issues wich i help you can give me an answer.
I have this EvalFunction :

[source lang="java"] public int evaluateBoard(int sign) // -1 = "computer" and +1 = "human" { int total = 0; int computer_closedmills = this.checkMills(-1); // count how many closed mills AI has (3 tokens in a row/column). int computer_openmills = this.checkFormers(-1); // count how many 2 in a row/column tokens AI has. int computer_blockers = this.checkBlockers(-1); // count if one AI token -> blocks 2 player's tokens int computer_tokensleft = this.checkTokens(-1); // count how many tokens AI has. int computer_openspaces = this.checkOpenSpaces(-1); // count how many move possibilities AI has (in current board) int player_closedmills = this.checkMills(1); // count how many "human" has int player_openmills = this.checkFormers(1); // count how many 2 in a row/column "human" has. int player_blockers = this.checkBlockers(1); // etc. int player_tokensleft = this.checkTokens(1); int player_openspaces = this.checkOpenSpaces(1); // compute total score total -= ((computer_closedmills * 20)+ (computer_openmills * 40) + (computer_blockers * 30) + (computer_tokensleft * 10) + (computer_openspaces*5)); total += ((player_closedmills * 20) + (player_openmills * 40) + (player_blockers * 30) + (player_tokensleft * 10) + (player_openspaces*5)); return total; }[/source]

Ok, now i have this situation as you can see below represented in this Picture :

http://imageshack.us...notworking.jpg/

Note that red tokens represent "computer".
Instead of moving token 22 to position 19 (wich will form a new mill) , my evalFunction() makes another decision
and moves something let's say like token 21 to position 9 , or 18 to position 10.

Can you help me improve my eval function so that token 22 moves to 19 ?
( so that mill 21-22-23 breaks and token 22 forms a new mill on 18-19-20)

thanks !

PARTNERS