< >

Simoji Quickstart Guide

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!

Example Program

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.

Some events can also happen on the board level:

Commands

Attributes

Agents can have attributes. You can define your own. Some are built in like:

Some attributes are booleans with only 2 states like:

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:

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.

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.

Keyboard shortcuts

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.

Printable Version

View source

Built with Scroll v68.0.0