enabled checkNode

master
melvin 2011-06-16 17:41:39 +08:00
parent e80a9324c1
commit 9711281fc4
1 changed files with 3 additions and 3 deletions

View File

@ -285,8 +285,8 @@ public class MCTSAI implements MagicAI {
private boolean checkNode(final MCTSGameTree curr, List<Object[]> choices) {
for (MCTSGameTree child : curr) {
final int checksum = obj2StringHash(choices.get(child.getChoice())[0]);
if (child.getChecksum() != checksum) {
final String checkStr = obj2String(choices.get(child.getChoice())[0]);
if (!child.desc.equals(checkStr)) {
System.err.println("ERROR! tree node and choice do not match");
printNode(curr, choices);
return false;
@ -368,7 +368,7 @@ public class MCTSAI implements MagicAI {
//all the children are in the tree, find the "best" child to explore
} else {
//assert checkNode(curr, choices);
assert checkNode(curr, choices);
assert curr.size() == choices.size() : "ERROR! Different number of choices in node and game" +
printNode(curr,choices);