Progress: First Real Run + Results

Initial observations of SmartAgent v1.0

  • Crashing (complete freezing) when findRelevantStates called sometimes with ArrayIndexOutOfBounds Exception.
  • Update: S-piece appears to crash program. Cancel that. Worked fine in one instance. Perhaps the 4th piece crashes the program? Crashed on S, 4th again. Nope.
  • Update: Could be the state culling part. FindRelevant might think there are C-3 states (or whatever that figure is) to choose from when some may have been culled. Further investigation. Appears to be the problem. The moment the substates contain (or rather don’t contain) a cullable state, it breaks.
    Need to modify findRelevantStates()
  • Pieces not being dropped when at goalPosition. Also sometimes not landing where goalPosition says they’ll be. Possible bad initialisation of centre to blame. Further evidence: A Z-piece dropped and it’s calculated centre (using the old method) would be initialised correct (x-wise anyway). Need to modify chaseGoal() and findPiece()
  • Pieces appear to have favourite locations to be at. Changes with every run, but remains constant during the run. No doubt a Set and greedy choosing to blame. Need to modify greedyAction()

Well, with a few minor problems, it went well. Note that all of these bugs should be addressed with tests. One more thing I noticed. When running the JUnit AllTests, one fails, but when debugging, it passes. I’m guessing it has to do with the Random number generator. Not a huge deal at the moment.

Update: Addressed all the problems above. All should be functioning correctly now. Need to go to the lab to find out. Damn Waitangi Day – closing the labs on me…