Skip to content

Instantly share code, notes, and snippets.

@craine
Created October 7, 2017 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craine/13fdc8a8c33cf83fbd2dc7d192283173 to your computer and use it in GitHub Desktop.
Save craine/13fdc8a8c33cf83fbd2dc7d192283173 to your computer and use it in GitHub Desktop.
Traceback (most recent call last):
This script evaluates the performance of the custom_score evaluation
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/tournament.py", line 157, in <module>
function against a baseline agent using alpha-beta search and iterative
main()
deepening (ID) called `AB_Improved`. The three `AB_Custom` agents use
ID and alpha-beta search with the custom_score functions defined in
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/tournament.py", line 153, in main
game_agent.py.
play_matches(cpu_agents, test_agents, NUM_MATCHES)
*************************
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/tournament.py", line 96, in play_matches
Playing Matches
*************************
counts = play_round(agent, test_agents, wins, num_matches)
Match # Opponent AB_Improved AB_Custom AB_Custom_2 AB_Custom_3
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/tournament.py", line 63, in play_round
Won | Lost Won | Lost Won | Lost Won | Lost
1 Random winner, _, termination = game.play(time_limit=TIME_LIMIT)
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/isolation/isolation.py", line 320, in play
game_copy = self.copy()
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/isolation/isolation.py", line 97, in copy
new_board._board_state = copy(self._board_state)
NameError: name 'copy' is not defined
Process finished with exit code 1
@craine
Copy link
Author

craine commented Oct 9, 2017

This script evaluates the performance of the custom_score evaluation
function against a baseline agent using alpha-beta search and iterative
deepening (ID) called AB_Improved. The three AB_Custom agents use
ID and alpha-beta search with the custom_score functions defined in
game_agent.py.

                    *************************                         
                         Playing Matches                              
                    *************************                         

Match # Opponent AB_Improved AB_Custom AB_Custom_2 AB_Custom_3
Won | Lost Won | Lost Won | Lost Won | Lost
1 Random Traceback (most recent call last):
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/tournament.py", line 157, in
main()
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/tournament.py", line 153, in main
play_matches(cpu_agents, test_agents, NUM_MATCHES)
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/tournament.py", line 96, in play_matches
counts = play_round(agent, test_agents, wins, num_matches)
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/tournament.py", line 63, in play_round
winner, _, termination = game.play(time_limit=TIME_LIMIT)
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/isolation/isolation.py", line 326, in play
curr_move = self._active_player.get_move(game_copy, time_left)
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/game_agent.py", line 346, in get_move
best_move = self.alphabeta(game, depth)
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/game_agent.py", line 453, in alphabeta
v = self.min_value(game.forecast_move(m), depth - 1, alpha, beta)
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/game_agent.py", line 387, in min_value
return self.score(game, self)
File "/Users/charliecraine/Documents/GitHub/AIND-Isolation-master/game_agent.py", line 37, in custom_score
if player == game.player_1:
AttributeError: 'Board' object has no attribute 'player_1'

Process finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment