The World: Difference between revisions
(Created page with "<section begin=image/> <section end=image/> <section begin="name" />'''<code>The World</code>'''<section end="name" /> is a code block part of the Environment drawer. == Usage== <p id="tooltip"><code>The World</code> refers to an agent that represents The World. Can be used as a location to mean the center of SpaceLand, which is (0,0).</p> ===Syntax=== <code>[Textbox Insert] The World</code> ==Common Uses== Useful for simulations that require recursion, or a...") |
(Marked this version for translation) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> | |||
<translate> | |||
<!--T:1--> | |||
<section begin=image/> | <section begin=image/> | ||
[[File:The world.png|alt=The world|thumb]] | |||
<section end=image/><p id="tooltip">Returns an agent (data type) that represents The World. Can be used as a location to mean the center of spaceland (0,0).</p> | |||
< | <!--T:8--> | ||
<section begin="name" />'''<code>The World</code>'''<section end="name" /> is a [[code block]] part of the [[Environment]] drawer. | <section begin="name" />'''<code>The World</code>'''<section end="name" /> is a [[code block]] part of the [[Environment]] drawer. | ||
== Usage== | <!--T:2--> | ||
==Usage== | |||
<code>The World</code> refers to an agent that represents The World. Can be used as a location to mean the center of SpaceLand, which is (0,0). | |||
==Syntax== <!--T:3--> | |||
<!--T:4--> | |||
<code>[Textbox Insert] The World</code> | <code>[Textbox Insert] The World</code> | ||
<!--T:5--> | |||
==Common Uses== | ==Common Uses== | ||
Useful for simulations that require recursion, or agents that can act as the base case. | Useful for simulations that require recursion, or agents that can act as the base case. | ||
==Nuances== | ==Example== <!--T:9--> | ||
<!--T:10--> | |||
[[File:the_world_example.gif|alt=The World example gif|thumb]] | |||
[[File:the_world_example.png|alt=The World example code|thumb]] | |||
<!--T:11--> | |||
The model above shows two different types of elephants living in the same environment. ‘Hungry elephants’ prioritize eating more grass higher than ‘elephant’ agents do. All elephants must eat grass in order to survive and reproduce. At the end of the simulation, if you wish to see how many elephants of each type that were in the first generation are still alive, you can push the ‘Highlight First Generation’ button, which turns all ‘elephants’ that were in the first generation magenta and all ‘hungry elephants’ that were in the first generation yellow. | |||
==Nuances== <!--T:6--> | |||
<!--T:7--> | |||
==Related Blocks== | ==Related Blocks== | ||
*<code>[[World Trait|world trait [▼]]]</code> | *<code>[[World Trait|world trait [▼]]]</code> | ||
Line 21: | Line 40: | ||
[[Category:Environment]] | [[Category:Environment]] | ||
[[Category:Code Block]] | [[Category:Code Block]] | ||
</translate> |
Latest revision as of 19:12, 11 August 2023
Returns an agent (data type) that represents The World. Can be used as a location to mean the center of spaceland (0,0).
The World
is a code block part of the Environment drawer.
Usage
The World
refers to an agent that represents The World. Can be used as a location to mean the center of SpaceLand, which is (0,0).
Syntax
[Textbox Insert] The World
Common Uses
Useful for simulations that require recursion, or agents that can act as the base case.
Example
The model above shows two different types of elephants living in the same environment. ‘Hungry elephants’ prioritize eating more grass higher than ‘elephant’ agents do. All elephants must eat grass in order to survive and reproduce. At the end of the simulation, if you wish to see how many elephants of each type that were in the first generation are still alive, you can push the ‘Highlight First Generation’ button, which turns all ‘elephants’ that were in the first generation magenta and all ‘hungry elephants’ that were in the first generation yellow.