-
Notifications
You must be signed in to change notification settings - Fork 0
/
cheatSheet.scroll
127 lines (98 loc) · 3.59 KB
/
cheatSheet.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import header.scroll
title Simoji Quickstart Guide
startColumns 3
* Simoji is a language and tool for thinkers to write shareable simulations using 😃's. You write your simulations in a simple language using mostly Emojis and then click play. Simoji is public domain, open source, and suggestions welcome!
https://github.com/breck7/simoji open source
# Example Program
code
comment Define an ant agent
🐜
comment Ants turn then move one space per tick
onTick
turnRandomly
move
comment Ants pick up food.
onHit
🥖
pickItUp
comment Define an ant hill
⛰
comment On each tick, with 5% odds
onTick 0.05
comment Spawn an ant
spawn 🐜
🥖
comment Set up the board.
insert 3 🥖
insert 1 ⛰
# Concepts
## Board
* The Board is the rectangle on which your simulation takes place. It has a width and height and is divided into a grid.
## Agents
* Agents are the key concept in Simoji. Everything you see on your board is an agent. In the code above, the ant, hill, and food are all agent types.
## Events
* Events are blocks of commands that execute during the running of the experiments. Probabilities can be assigned so blocks run stochastically.
- onTick
- onHit
- onDeath
* Some events can also happen on the board level:
- onTick
- onExtinct
## Commands
- kickIt
- replaceWith
- spawn
- remove
- pickItUp
- turnRandomly
- turnToward
## Attributes
* Agents can have attributes. You can define your own. Some are built in like:
- health
* Some attributes are booleans with only 2 states like:
- solid
- bouncy
## Experiments
* You can run multiple boards at the same time using the `experiment` keyword. You can tweak any words in your experiments. Usually you want to change Settings. The maximum boards at one time is currently 4.
## Parameters
* You can define parameters that you use throughout your simulation code. This makes it easy to tweak them in experiments. For example:
code
lightningFrequencySetting .1
experiment
comment Lots of lightning
lightningFrequencySetting .5
## Reports
* Data is collected during the running of every experiment. You can export this data to CSV and/or start analyizing it immediately in the Ohayo app.
## Board Setup
* You can setup your board with the following commands.
- insert
- paste
## Agent Palette
* You can drop new Agents onto your board using the Agent Palette on the right side of your screen.
# Tree Notation
* Simoji the language is a Tree Language. There are no visible syntax characters. Indentation is used for parent/child relationships. Here is the grammar.
https://treenotation.org Tree Language
https://jtree.treenotation.org/designer#url%20https%3A%2F%2Fsimoji.treenotation.org%2Fdist%2Fsimoji.grammar grammar
# Keyboard shortcuts
pipeTable
Combo|Command
Spacebar|Play/Pause
?|Toggle Help
t|Advance one tick
r|Reset Experiments
s|Snapshot Current Starting Params
o|Open Reports
c|Export CSV data
d|Toggle Debugger
Arrows|Move selection
Backspace|Delete selection
# Sharing Your Simulations
* At the top of the page you should see a link that you can copy and paste to share your sim. When you update your simulation code that link will update.
## Loading a Simulation from a URL
* You can load any simulation from a publicly accessible URL by prefixing it with: `https://simoji.treenotation.org/#url `. For example: https://simoji.treenotation.org/#url%20https://simoji.treenotation.org/examples/eatTheBacon.simoji
# Getting Involved
* The source code for Simoji and all development happens on Github.
https://github.com/breck7/simoji Github
# Printable Version
link ./cheatSheet.pdf
import footer.scroll