Skip to content
This repository has been archived by the owner on Aug 7, 2018. It is now read-only.

Running Example Scripts

SchmitzSam edited this page Apr 10, 2017 · 9 revisions

The following are example scripts that come with MIDCA. These scripts are meant to be run via command line. For most of these scripts, it will wait for you to enter a command (or press enter) to continue the script. Each time you press enter the script will continue to the next phase of execution. For a list of all commands, see Runtime Commands

chicken_run.py

This script runs a simple version of MIDCA in a trivial domain where chickens cross the road. The state consists of a left side of the road and right side of the road. Possible goal predicates are onleft and onright, possible goal args are clucky and ladycluck, representing two chickens. Goals must be manually entered by the user. To insert a goal, continue until the Interpret phase where the user will be prompted for a goal. For example, you can add onleft(clucky) to specify that clucky should be on the left side of the road.

To see the current state, run the command: show

cogsci_demo.py

This script runs a version of MIDCA in the arsonist domain. The arsonist domain (Paisner, Matt, et al. 2013) is a blocksworld-based domain with an unseen arsonist lighting blocks on fire (fire is a dynamic quality of the arsonist domain; at any time a block can be put on fire regardless of the agent's actions). Goals will be automatically created by TF-Trees (see Maynord, Michael, et al. (2013) for more detail) in the Interpret phase. The user is also able to insert goals.

After MIDCA goes through a few cycles, you will see some blocks catch on fire. In the visual ascii drawing, this is represented by the * around the block's label. When a block catches on fire, MIDCA will pursue a goal to catch the arsonist (specifically named "Gui Montag" in this example). After Gui Montag has been apprehended, MIDCA will put out all the fires and continue stacking blocks.

Next: MIDCA Runtime Commands