[Commit] RRbot RicochetRecursive.java,1.3,1.4

Adam Ingram-Goble commit at keithp.com
Tue Jun 10 11:38:19 PDT 2003


Committed by: adamaig

Update of /local/src/CVS/RRbot
In directory home.keithp.com:/tmp/cvs-serv32296

Modified Files:
	RicochetRecursive.java 
Log Message:


Index: RicochetRecursive.java
===================================================================
RCS file: /local/src/CVS/RRbot/RicochetRecursive.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- RicochetRecursive.java	10 Jun 2003 07:33:45 -0000	1.3
+++ RicochetRecursive.java	10 Jun 2003 17:38:17 -0000	1.4
@@ -100,7 +100,6 @@
     // main search function
     public static int IDAstar ( int curDepth, int maxDepth, Node curNode ) {
 
-        totalNodes++;
         if( curDepth == maxDepth ) {
             return 0;
         }
@@ -119,6 +118,7 @@
                 if ( board.makeMove( robots[i], j ) != 1 ) {
                     continue;
                 }
+                totalNodes++;
                 //add move to move string
                 String newMoves = new String( curNode.moves );
                 newMoves += i + "" +  j;
@@ -138,7 +138,6 @@
                     continue;
                 }
 
-
                 //create a new node
                 newNode = new Node( g, h, newMoves );
                 // store robot's positions in the new node
@@ -146,14 +145,6 @@
                     newNode.placeRobot( k, robots[k].rpos(), robots[k].cpos() );
                 }
 
-                
-                int rc = 0;
-            /*
-                if( 0 != ( rc = IDAstar( curDepth, maxDepth, newNode ) ) ) {
-                    return rc;
-                }
-              */ 
-               
                 Long zkey = stopT.getKey( robots );
                 Node old = (Node) stopT.get( zkey );
                 boolean prune = 
@@ -174,7 +165,6 @@
                 IDAstar( curDepth, maxDepth, newNode );
 
                 stopT.put( zkey, newNode );
-
               
                 // undo the move
                 board.takeBackMove ( robots[i], oldRow, oldCol, robots[i].rpos()




More information about the Commit mailing list