Skip to content
M Charity edited this page Nov 12, 2021 · 2 revisions

Agents

Evaluator Agents are saved in the agents folder with the extension [NAME]_AGENT.js and contains the following examples:

Output reports for agent results are saved to the reports folder based in the form [NAME]_report.json with the following information for each level evaluated by the agent:

  • id - the id number for the level evaluated as specified in the level's level_set file.
  • iterations - number of calls to the agent's step function until a solution was found
    • (Default Maximum per agent: 10k iterations)
  • time - real-time taken by the agent until a solution was found
    • (Default Maximum per agent: 10 seconds)
  • solution - agent's returned solution for the level in abbreviated form
    • (Key: see simulation description)

Create a new agent:

  1. Copy the empty_AGENT.py a new file with the format [NAME]_AGENT.py and save it in the agents folder
  2. (Optional) Create any initializing function needed (i.e. queue setup, tree setup, model setup, etc.) and include it in the init() function definition of the module_exports object
  3. Code the step-wise execution code in the iter_solve function. The exec.js module will run the agent's step() function every iteration and pass it the initial game state of the level.

Test an agent

  1. On the right side of the interface page, select a level set to evaluate an agent on by clicking the dropdown.
  2. Select an agent to evaluate on by clicking the dropdown
  3. Click the 'Run Agent' button to start the evaluation.
    • Note: Only unsolved level will be solved
  4. Click the 'Pause Agent' button at any time to stop the evaluation

Delete saved agent reports

  1. Click the 'Reset all levels' button to delete the saved reports for this agent on this level set

Clone this wiki locally