Download presentation
Presentation is loading. Please wait.
1
Simulation Properties and Agent Attributes
Scalable Game Design Project AgentSheets® Thought Amplifier Funded in part by
2
Overview Discussion What are Simulation Properties?
What are Agent Attributes? When MUST you use each? When is it “designer’s choice”? Naming conventions Examples Exercises Challenge Add notes as needed
3
Discussion What are Simulation Properties? What are Agent Attributes?
When MUST you use each? When is it “designer’s choice”? Add notes as needed
4
What is a Simulation Property?
Information common to, accessible to, and shareable by all agents in a project In programming languages, often referred to as a “global variable” Analogy: number of cars in a parking lot Each driver affects the number of cars by entering/exiting Every driver can “see” the number of cars Add notes as needed
5
What is an Agent Attribute?
Information unique to each agent In programming languages, often referred to as a “local variable” Accessible for write/update only by the agent possessing the attribute Visible for read only by agents immediately surrounding the agent possessing the attribute Analogy: mileage of each car in a lot Only the driver can change the mileage on a car Nearby drivers can “see” the mileage of neighboring cars (by looking through the driver’s window) Add notes as needed
6
When Must You Use a Simulation Property?
If multiple agents must be able to “see” and/or update the information Example: In a Sokoban project, Palette agents must report (add to a counter) if a box is resting atop them. Example: Contagion model requires maintaining a statistic of the number of infections that occur. Example: in wildfire model, trees are more likely to catch fire based on current wind direction Add notes as needed
7
When Must You Use an AgentAttribute?
If each agent has information unique to that agent Example: In a model in which one agent seeks another using hill-climbing, a medium agent (e.g., a floor agent) maintains the attribute on which hill-climbing is based In a game in which a certain number of collisions (“hits”) are required to remove an agent Example: In a contagion model, when a person agent gets sick, it remains sick for a certain number of simulation cycles before recovering Add notes as needed
8
When Can You Choose the Variable Type?
If none of the “must” conditions apply! Example: A clock agent maintains the elapsed time of simulation Example: A monitor agent maintains the current number of sick persons in a contagion model Add notes as needed
9
Naming Conventions All variables must begin with a letter
Names may contain letters, numbers, and the underscore character (“_”) Variables are case-insensitive when used in conditions and actions When referring to simulation property in a condition or action, the character must precede the name Spaces should not be used! Simulation property examples: @trees, @maximum_count, @steps_36 Agent attribute examples: contacts, max_width, row_number, years_2_grow Add notes as needed
10
Exercises #1 Choose which variable type to use and justify. Is that type required or a “designer’s choice”? In a Frogger game, the total number of trucks generated In a Frogger game, the maximum number of trucks generated by a single tunnel In a Frogger game, the number of moves made by the frog In a Frogger game, the number of frog lives remaining In a Spacer Invaders game, the number of “hits” received by the mother ship In a Pacman game, the number of pellets eaten by the pacman Add notes as needed
11
Exercises #2 Choose which variable type to use and justify. Is that type required or a “designer’s choice”? In a predator-prey model, the number of prey eaten In a predator-prey model, the currenthunger level of the predator In a forest fire model, the number of burning trees In a forest fire model, the number of unburned trees In a forest fire model the maximum time any tree has burned In a contagion model, the number of sick persons In a contagion model, the number of persons who died Add notes as needed
12
Implement one or more of the above exercises
Challenge Implement one or more of the above exercises In the comments section of the method(s) in your example document the variable(s) used and the reasoning for selecting that approach Add notes as needed
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.