|
def | __init__ (self, thePuzzle, theHand, thePlanner=None, thePlannerHand=None, theFig=None, shareFlag=True, theParams=ParamSTL()) |
|
def | display (self, ID_DISPLAY=True, CONTOUR_DISPLAY=True) |
|
def | simulate_step (self, ID_DISPLAY=True, CONTOUR_DISPLAY=True) |
|
def | __init__ (self, thePuzzle, theSolution=None, thePlanner=None, theFig=None, shareFlag=True, theParams=ParamBasic) |
|
def | addPiece (self, piece) |
|
def | display (self, theImage=None, ID_DISPLAY=True, CONTOUR_DISPLAY=True, BOUNDING_BOX=True) |
|
def | dragPieces (self, pVecs) |
|
def | progress (self, gt_pAssignments) |
|
def | rmPiece (self, id) |
|
def | setPieces (self, pLocs) |
|
def | takeAction (self, plan, verbose=False) |
|
def | toImage (self, theImage=None, theMask=None, ID_DISPLAY=False, COLOR=(0, 0, 0), CONTOUR_DISPLAY=True, BOUNDING_BOX=True) |
|
def | translateAction (self, pAssignments, piece_id) |
|
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
thePuzzle, |
|
|
|
theHand, |
|
|
|
thePlanner = None , |
|
|
|
thePlannerHand = None , |
|
|
|
theFig = None , |
|
|
|
shareFlag = True , |
|
|
|
theParams = ParamSTL() |
|
) |
| |
@brief: The timeless simulator class that simulates the puzzle solving progress.
The class stores an initial board, a solution board, and an agent instance.
During the simulation, the simulator will execute the following process:
1. Let the agent observe the board
2. Let the agent process the board, which means:
2.1 Plan actions if don't know what to do (no more stored actions)
2.2 Execute the next planned actions
3. If no more process result, meaning no more plans or actions to be executed,
then end the simulation. Otherwise repreat the above process
@param[in] init_board The initial board
@param[in] sol_board The solution board
@param[in] agent The puzzle solving agent
@param[in] param The parameters
Reimplemented in SimTime.
◆ display()
def display |
( |
|
self, |
|
|
|
ID_DISPLAY = True , |
|
|
|
CONTOUR_DISPLAY = True |
|
) |
| |
@brief Displays the current puzzle board.
Args:
ID_DISPLAY: Flag indicating ID_DISPLAY or not.
CONTOUR_DISPLAY: Flag indicating CONTOUR_DISPLAY or not.
Reimplemented in SimTime.
◆ simulate_step()
def simulate_step |
( |
|
self, |
|
|
|
ID_DISPLAY = True , |
|
|
|
CONTOUR_DISPLAY = True |
|
) |
| |
@brief Create the simulation.
Args:
ID_DISPLAY: Display the ID on the board.
CONTOUR_DISPLAY: Display the contours of the puzzle pieces or not.
◆ cache_action
◆ canvas
◆ fig
◆ hand
◆ im
◆ params
◆ plannerHand
◆ shareFlag
The documentation for this class was generated from the following file: