Probably important...
[progcomp2013.git] / agents / bishop.py
index 036e7a6..3c7738e 100755 (executable)
@@ -35,7 +35,7 @@ class Agent(AgentRandom): # Inherits from AgentRandom (in qchess.py)
                return float(self.value[piece.types[0]] + self.value[piece.types[1]]) / 2.0
                
        # Score possible moves for the piece
-       # Highest score is 1.0 (which means: make this move!)
+       
        def prioritise_moves(self, piece):
 
                #sys.stderr.write(sys.argv[0] + ": prioritise called for " + str(piece) + "\n")
@@ -140,7 +140,7 @@ class Agent(AgentRandom): # Inherits from AgentRandom (in qchess.py)
 
                if self.recurse_for >= 0:
                        opts = opts[0:self.recurse_for]
-               sys.stderr.write(sys.argv[0] + " : Before recurse, options are " + str(opts) + "\n")
+               #sys.stderr.write(sys.argv[0] + " : Before recurse, options are " + str(opts) + "\n")
 
                # Take the best few moves, and recurse
                for choice in opts[0:self.recurse_for]:
@@ -162,7 +162,7 @@ class Agent(AgentRandom): # Inherits from AgentRandom (in qchess.py)
                
 
                opts.sort(key = lambda e : e[1][1], reverse = True)
-               sys.stderr.write(sys.argv[0] + " : After recurse, options are " + str(opts) + "\n")
+               #sys.stderr.write(sys.argv[0] + " : After recurse, options are " + str(opts) + "\n")
 
                self.depth -= 1
                return list(opts[0])
@@ -291,8 +291,8 @@ def main(argv):
        
        agent = Agent(argv[0], colour) # Creates your agent
 
-       graphics = AgentGraphics(agent.board, title="Agent Bishop (" + str(colour) + ") - DEBUG VIEW")
-       graphics.start()
+       #graphics = AgentGraphics(agent.board, title="Agent Bishop (" + str(colour) + ") - DEBUG VIEW")
+       #graphics.start()
 
        # Plays quantum chess using your agent
        while True:
@@ -312,8 +312,8 @@ def main(argv):
                else:
                        agent.update(line) # Updates agent.board
 
-       graphics.stop()
-       graphics.join()
+       #graphics.stop()
+       #graphics.join()
        return 0
 
 # Don't touch this

UCC git Repository :: git.ucc.asn.au