AI Coding Tools

Command Palette

Search for a command to run...

Ecosystem Evolution Simulator

Single-file artificial-life simulator with predator/prey/food energy dynamics, a round rotating 3D map, cute animated agents, live controls, and real population graphs.

<brief>
Create a playful living-garden simulator.

The app shows a small round world with fruit trees, blue blobs, and red blobs. The user can tune the rules, press play, and watch the three groups rise and fall over time.

The experience should feel like a cute animated ecology toy: a little tabletop world with moving bean-shaped characters, visible fruit, live controls, and charts that tell the story of what happened.
</brief>

<freedom>
Use creative freedom. Choose the layout, controls, visuals, algorithms, and technical approach that make the experience strongest.

This prompt gives direction, not a strict checklist. The important part is that the world feels alive, the numbers come from the simulation, and the user can understand cause and effect.
</freedom>

<world>
The world is a round 3D-looking map, like a tiny raised garden dish.

Good visual direction:

- A circular map the user can drag to rotate.
- Trees or bushes with green fruit.
- Blue glossy oval blobs with simple faces.
- Red glossy oval blobs with simple faces.
- Soft shadows, depth, bouncing, blinking, leaning, and small personality.
- Click a blob to inspect it.

Food should look attached to plants. When a blob uses fruit, the plant should visibly have less fruit, then slowly grow fruit again later.
</world>

<simulation>
Each blue and red blob has energy.

Energy changes over time:

- Moving uses energy.
- Waiting uses a little energy.
- Blue blobs restore energy from fruit.
- Red blobs restore energy after a gentle contact interaction with blue blobs.
- Making a new blob uses stored energy, so group size cannot grow for free.
- Fruit returns slowly after being used.

These simple rules should create natural waves:

- More fruit helps blue blobs grow.
- More blue blobs helps red blobs grow.
- Too many red blobs lowers the blue group.
- If blue blobs become rare, red blobs run low on energy and fade.
- With balanced settings, the blue and red groups should rise and fall out of phase.

Do not fake the chart curves. The waves should come from the energy rules.
</simulation>

<motion>
The blobs should visibly choose what they are doing.

Blue blobs can look for fruit, gather near trees, wander, avoid crowded areas, or move away from nearby red blobs.

Red blobs can look for blue blobs, wander when none are nearby, and pause briefly after a successful contact interaction.

Eating and contact should have short cute animations: a pause, chew, bounce, glow, sparkle, fruit shrink, or energy pulse. These pauses should affect behavior so blobs cannot instantly repeat the same action over and over.
</motion>

<controls>
Give the user controls that feel like tuning a living toy.

Useful controls:

- Fruit growth speed.
- Fruit limit.
- Fruit return delay.
- Blue blob energy use.
- Blue blob speed.
- Blue blob vision.
- Blue blob copy threshold.
- Blue blob eating time.
- Red blob energy use.
- Red blob speed.
- Red blob vision.
- Red blob contact strength.
- Red blob copy threshold.
- Red blob pause time.
- Starting fruit trees.
- Starting blue blobs.
- Starting red blobs.
- World size.
- Random seed.
- Simulation speed.

Include play, pause, step, reset, randomize, and a few presets such as balanced garden, fruit-rich garden, red-heavy garden, fragile balance, and low-fruit garden.
</controls>

<charts>
Show the story with real charts from recorded history.

The main chart should show fruit, blue blobs, and red blobs together on one timeline. Use any readable scaling that keeps all three visible at once.

Helpful extra views:

- A blue-vs-red phase plot.
- A run summary.
- Trait trends if the blobs can inherit traits.

The summary can say things like:

- The garden stayed balanced.
- Blue blobs grew first, then red blobs followed.
- Low fruit kept the garden small.
- One group faded and the world settled into a simpler state.
</charts>

<inspection>
When the user clicks a blob, show useful details:

- Group color.
- Energy.
- Age.
- Current action.
- Speed.
- Sensing range.
- Time left in any eating or pause animation.
- Traits or family info if included.
</inspection>

<quality>
A strong result should demonstrate:

- Long-running waves between blue and red groups.
- A fruit-rich setting where blue blobs grow quickly.
- A low-fruit setting where the whole garden stays small.
- A red-heavy setting where blue blobs dip first and red blobs fade later.
- Group sizes that level out instead of growing forever.

Prioritize believable emergent behavior, clear controls, readable charts, and charming map animation.
</quality>