games.single_player.rubiks.agent¶
Rubik’s Cube agent implementation.
Classes¶
Rubik's Cube game agent. |
Module Contents¶
- class games.single_player.rubiks.agent.RubiksCubeAgent(config)¶
Bases:
haive.core.engine.agent.agent.Agent
[haive.games.single_player.rubiks.config.RubiksCubeConfig
]Rubik’s Cube game agent.
Initialize the chess agent.
- Parameters:
config (haive.games.single_player.rubiks.config.RubiksCubeConfig)
- check_solved(state)¶
Check if the cube is solved.
- Parameters:
state (haive.games.single_player.rubiks.state.RubiksCubeState)
- Return type:
langgraph.types.Command
- game_over(state)¶
Handle game over.
- Parameters:
state (haive.games.single_player.rubiks.state.RubiksCubeState)
- Return type:
langgraph.types.Command
- handle_player_turn(state)¶
Handle player input.
- Parameters:
state (haive.games.single_player.rubiks.state.RubiksCubeState)
- Return type:
langgraph.types.Command
- process_move(state)¶
Process a cube move.
- Parameters:
state (haive.games.single_player.rubiks.state.RubiksCubeState)
- Return type:
langgraph.types.Command
- route_game_status(state)¶
Route based on game status.
- Parameters:
state (haive.games.single_player.rubiks.state.RubiksCubeState)
- Return type:
- route_player_action(state)¶
Route based on player action.
- Parameters:
state (haive.games.single_player.rubiks.state.RubiksCubeState)
- Return type:
- scramble_cube(state)¶
Scramble the cube based on difficulty.
- Parameters:
state (haive.games.single_player.rubiks.state.RubiksCubeState)
- Return type:
langgraph.types.Command
- setup_workflow()¶
Set up the workflow graph.