|
...........................................................................................................................................
Quick AgentSheets Instructions to Get You Started
Full instructions are available online at the AgentSheets web site. The instructions below are a quick overview to get you started. In AgentSheets you give instructions, called "behavior", to agents that then use these instructions to tell them what to do on a sheet called a "Worksheet". An agent can be seen because you edit the way it looks, called its "depiction". In fact, an agent can have more than one depiction that it can change according to rules. The Worksheet is a grid. Each agent is just the size of one grid. You cannot change the grid size except when you start making a new AgentSheets project. When you open a project in AgentSheets, you see two windows: a Gallery and a Worksheet. The Gallery shows all the agents and their depictions. Click once on a depiction to select it. Click twice on it to open an editor that allows you to change the depiction. The Worksheet has run/stop buttons. You can leave the simulation running while you change the depictions and behaviors of the agents. The tools along the left side of the Worksheet have the following use: To see how the behavior is programmed, select an agent and then pick the menu item Gallery: Edit Behavior. You will see the program in a graphical form that is very easy to read. This program is executed over and over for each agent of this type on the Worksheet. The program consists of blocks of code called "methods". Within a method there are lines called "rules". Each rule has an "if" part and a "then" part. Inside the "if" box there are " conditions". Double click on a "if" box to see all the possible conditions. The computer goes down the list of rules checking whether all the "if" conditions for each rule are true. A rule with a blank "if" condition is always true. When the computer finds a rule with a true (or blank) "if" part, it goes on to the "then" part of the rule. Inside the "then" box there will be one or more actions for the computer to execute. Double-click on a "then" box to see all the possible actions. Once the computer finishes doing the actions, it stops executing that method. No other rules are considered. You will always see a method that starts "While running". As long as the "run" button is on, this method is executed repeatedly for every agent. If there are other methods, they are executed only if asked by an action or by the user clicking on one of the programmable tools, such as the hammer. To change the program, you can change the values in the conditions and actions, you can make new rules and methods, and you can drag new conditions and actions into rules. Experiment. Here are some things you may need to know: There is one tricky thing in Pop3 and Moose. A rule in one agent can invoke a method in the behavior of another kind of agent using the "broadcast" action. This is how Pop3 counts how many black balls there are. The counter agent broadcasts a command to all the dots. This causes each, in turn, to broadcast a command to the counters (there is usually only one) to increase their count by one. If the count started at zero, then this results in counting how many dots there are. The Moose project has agents with different depictions. All the depictions of one agent are linked by lines in the Gallery. You can, for instance, see a male moose facing left or right. These are different depictions of the same male moose agent. All depictions of the same agent have the same behavior. Thus, for instance, the male moose has a behavior but there are not different behaviors for left- and right-facing male moose. Suggestions for running the programs To start a program, first close any AgentSheets Gallery windows and then double-click on the Worksheet you want to see. Click on Run and leave it on. ........................................................................................................................................... |
|
[ return to AgentSheets Introduction ]
Copyright © 1999 The Concord Consortium |
