chore: Code cleanup
This commit is contained in:
parent
07597c0ce6
commit
860b3c2134
|
@ -3,7 +3,7 @@ from typing import override, Optional
|
|||
import collections, unittest
|
||||
|
||||
from pantograph.server import Server, TacticFailure
|
||||
from pantograph.expr import Expr, Tactic, Goal, GoalState
|
||||
from pantograph.expr import Expr, Tactic, GoalState
|
||||
|
||||
|
||||
@dataclass
|
||||
|
@ -27,7 +27,6 @@ class SearchState:
|
|||
return all(self.solved)
|
||||
|
||||
|
||||
|
||||
class Agent:
|
||||
|
||||
def next_tactic(self, state: GoalState, goal_id: int) -> Optional[Tactic]:
|
||||
|
@ -121,6 +120,7 @@ class Agent:
|
|||
self.reset()
|
||||
return False
|
||||
|
||||
|
||||
class DumbAgent(Agent):
|
||||
|
||||
def __init__(self):
|
||||
|
@ -159,6 +159,7 @@ class DumbAgent(Agent):
|
|||
self.goal_tactic_id_map[key] = i + 1
|
||||
return tactics[i]
|
||||
|
||||
|
||||
class TestSearch(unittest.TestCase):
|
||||
|
||||
def test_solve(self):
|
||||
|
@ -175,5 +176,6 @@ class TestSearch(unittest.TestCase):
|
|||
flag = agent.search(server=server, target="∀ (p q: Prop), Or p q -> Or q p", verbose=True)
|
||||
self.assertTrue(flag)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue