Symphony 1.0
|
Represents the vacuum cleaner problem. This class defines the initial state, goal test, actions, and heuristics for the vacuum cleaner problem. The problem is to clean two dirty rooms with a vacuum cleaner. The goal is to clean both rooms. More...
#include <vacuum.h>
Public Member Functions | |
VacuumCleaner () | |
~VacuumCleaner () | |
bool | goal_test (State *state) override |
Tests if a given state satisfies the goal condition. | |
std::vector< std::shared_ptr< Action > > | actions (std::shared_ptr< State > state) override |
Returns the possible actions for the given state. | |
double | heuristic (State *state) override |
Returns the heuristic value for the given state. | |
Public Member Functions inherited from Problem | |
Problem () | |
Constructor for the Problem class. | |
virtual | ~Problem () |
Virtual destructor for the Problem class. | |
virtual State * | initial_state () |
Retrieves the initial state of the problem. | |
Additional Inherited Members | |
Public Attributes inherited from Problem | |
State * | initial_state_ |
Pointer to the initial state of the problem. | |
Represents the vacuum cleaner problem. This class defines the initial state, goal test, actions, and heuristics for the vacuum cleaner problem. The problem is to clean two dirty rooms with a vacuum cleaner. The goal is to clean both rooms.
|
inline |
Definition at line 38 of file vacuum.h.
References Problem::initial_state_.
|
inlineoverridevirtual |
Returns the possible actions for the given state.
state | The current state. |
Implements Problem.
Definition at line 56 of file vacuum.h.
References actions().
Referenced by actions().
|
inlineoverridevirtual |
Tests if a given state satisfies the goal condition.
This method must be implemented by the user to define the goal state criteria.
state | The state to test. |
nul.l check
Implements Problem.
Definition at line 43 of file vacuum.h.
References VacuumState::dirty0.
|
inlineoverridevirtual |
Returns the heuristic value for the given state.
state | The current state. |
Implements Problem.
Definition at line 87 of file vacuum.h.
References VacuumState::dirty0.