X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=agents%2Fbishop.py;h=3c7738e540bc9d17f2496d6ff6e137089e07998a;hp=036e7a6806bdbc30d92391552fe499ba24efb294;hb=521b6fc0521aa0fb9fef52ec2778474887fad12f;hpb=65d9bb84c7e2dca4a8fac4d92c225ce1bb4f7c52 diff --git a/agents/bishop.py b/agents/bishop.py index 036e7a6..3c7738e 100755 --- a/agents/bishop.py +++ b/agents/bishop.py @@ -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