AI_PROJECT/Node.py

13 lines
372 B
Python
Raw Normal View History

2024-04-12 22:11:30 +02:00
class Node:
state = None #[{stan}]
parent = None #[Node]
action = None #[Forward/Right/Left]
def __init__(self, state):
self.state = state
2024-04-25 22:56:18 +02:00
def __lt__(self, other):
"""
Definicja metody __lt__ (less than), która jest wymagana do porównywania obiektów typu Node.
"""
return self.g + self.h < other.g + other.h