[Commit] RRbot RicochetRecursive.java,1.2,1.3

Christian L. Platt commit at keithp.com
Tue Jun 10 01:33:48 PDT 2003


Committed by: plattc

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

Modified Files:
	RicochetRecursive.java 
Log Message:
Did some fine tuning.


Index: RicochetRecursive.java
===================================================================
RCS file: /local/src/CVS/RRbot/RicochetRecursive.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- RicochetRecursive.java	10 Jun 2003 06:31:01 -0000	1.2
+++ RicochetRecursive.java	10 Jun 2003 07:33:45 -0000	1.3
@@ -129,8 +129,7 @@
                     solutionFound( newMoves );
                 }
                 //calculate h for new node
-                //h = (int) (1.5 * distMatrix[robMatrixPos][goalMatrixPos]);
-                h =  distMatrix[robMatrixPos][goalMatrixPos];
+                h = (int) (1.3 * distMatrix[robMatrixPos][goalMatrixPos]);
 
 
                 if ( g + h > maxDepth ) {
@@ -167,15 +166,14 @@
                             , robots[i].cpos() );
                     continue;
                 }
-                //if ( old != null ) {
-                    //removedNodes++;
-                    //stopT.remove(zkey);
-                //} else { 
+                if ( old != null ) {
+                    removedNodes++;
+                    stopT.remove(zkey);
+                } 
 
-                    IDAstar( curDepth, maxDepth, newNode );
+                IDAstar( curDepth, maxDepth, newNode );
 
-                    stopT.put( zkey, newNode );
-                //}
+                stopT.put( zkey, newNode );
 
               
                 // undo the move
@@ -183,8 +181,7 @@
                         , robots[i].cpos() );
             }
         }
-        //Long zkey = stopT.getKey( robots );
-        //stopT.put( zkey, newNode );
+
         return 0;
     }
 




More information about the Commit mailing list