|
def | __init__ (self, thePuzzle, theHand, thePlanner=None, thePlannerHand=None, theFig=None, shareFlag=True, theParams=ParamST()) |
|
def | calibrate (self, ID_DISPLAY=True) |
|
def | display (self, ID_DISPLAY=True, CONTOUR_DISPLAY=True) |
|
def | instruction (self) |
|
def | reset_cache (self) |
|
def | simulate_step (self, robot_only=False, ID_DISPLAY=True, CONTOUR_DISPLAY=True) |
|
def | simulate_step_small (self) |
|
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 = ParamST() |
|
) |
| |
@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] thePuzzle The current board
@param[in] agent The puzzle solving agent
@param[in] param The parameters
Reimplemented from SimTimeLess.
◆ calibrate()
def calibrate |
( |
|
self, |
|
|
|
ID_DISPLAY = True |
|
) |
| |
@brief Provide the user with an option to manually segment the solution board into several regions by mouse. The regions could be used later.
Args:
ID_DISPLAY: Display the ID or not.
◆ 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 from SimTimeLess.
◆ instruction()
@brief Display a screen with some instructions.
◆ reset_cache()
◆ simulate_step()
def simulate_step |
( |
|
self, |
|
|
|
robot_only = False , |
|
|
|
ID_DISPLAY = True , |
|
|
|
CONTOUR_DISPLAY = True |
|
) |
| |
@brief Create the simulation.
Args:
robot_only: If there is no hand.
ID_DISPLAY: Display the ID on the board.
CONTOUR_DISPLAY: Display the contours of the puzzle pieces or not.
◆ simulate_step_small()
def simulate_step_small |
( |
|
self | ) |
|
Overwrite the simulate_step function
◆ cache_action
◆ cluster_piece_dict
◆ cluster_region_list
◆ FPS
◆ FramePerSec
◆ pygameFig
◆ shareFlag
◆ timer
The documentation for this class was generated from the following file:
- /home/pvela/python/puzzle_solver/puzzle/simulator/simTime.py