| Author |
Message |
Michael Asher (Mike)
| | Posted on Sunday, October 08, 2006 - 5:06 am: | |
Hi - Can somebody help; I have written a game but for some reason the computer opponent always passes. Even though the (option "pass turn" false) is set. Does anybody know how to solve this?? |
Mats W (Kålroten)
| | Posted on Sunday, October 08, 2006 - 8:01 am: | |
There must be an extra 'add' in the code somewhere, that is, an add without a parameter. This sometimes happens in loops, when an unnecessary 'add' is added at the end. Mats |
Michael Asher (Mike)
| | Posted on Sunday, October 08, 2006 - 1:53 pm: | |
Thanks for the tip is ther an easy way to spot this. I have tried removing several "add" commands but get the same problem. |
Mats W (Kålroten)
| | Posted on Sunday, October 08, 2006 - 2:42 pm: | |
You could try to figure out a different code logic. That's what I always do when I run into problems. After a while I give up and try another solution. But you should be able to spot the extra add by investigating the code. I can't see another reason why Zillions would pass a move. Mats |
Greg Schmidt (Gschmidt)
| | Posted on Sunday, October 08, 2006 - 9:39 pm: | |
If there is a bug in your move generation code such that no legal moves can be produced, then I believe that by default the computer will choose to pass. -- Greg |
Michael Asher (Mike)
| | Posted on Monday, October 09, 2006 - 9:55 am: | |
Ok I will try again; but I don't think it's the legal moves problem. The computer is sometimes passing on it's first move |
Sean Duggan (Dream)
| | Posted on Monday, October 09, 2006 - 11:35 am: | |
*shrug* Could be that moving first is a disadvantage. Since it can make a null move, it takes that instead. |
Michael Asher (Mike)
| | Posted on Wednesday, October 11, 2006 - 3:53 pm: | |
In the end it was too many "add" commands. Difficult to spot but solved the problem - Thanks |