Created
February 9, 2016 03:32
-
-
Save aacunningham/7c99d0751beff3351291 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node: | |
def __init__(self, state, parent=None, action=None, cost=0): | |
self.state = state | |
self.parent = parent | |
self.action = action | |
self.cost = cost | |
if parent is not None: | |
self.depth = parent.depth + 1 | |
else: | |
self.depth = 0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment