All MicroEvals
Hamster Simulation
Create MicroEval
Header image for Hamster Simulation

Hamster Simulation

Prompt

Create a complete interactive hamster colony simulation as a single self-contained HTML file. The simulation should include: - At least 20 autonomous hamsters with individual names, ages, hunger, thirst, energy, health, personality traits, and relationships. - Hamsters should independently explore, eat, drink, sleep, play, fight, become friends, form couples, reproduce, age, and die. - Each hamster must make decisions based on its current needs and nearby objects. - Include food bowls, water bottles, nests, tunnels, exercise wheels, toys, and hiding places. - Hamsters should carry food into storage areas and compete for limited resources. - Add genetics: offspring should inherit fur color, size, speed, temperament, and lifespan from their parents with small mutations. - Include a day/night cycle and visibly change hamster behavior at night. - Display the simulation using Canvas with smooth animation and cute, recognizable hamster characters. - Clicking a hamster should open an information panel showing its statistics, parents, children, friends, partner, current activity, and lifetime history. - Add controls for simulation speed, pause, adding food, adding water, spawning a hamster, and creating obstacles. - Include charts for total population, births, deaths, average health, and available food over time. - The ecosystem should remain functional for long periods without crashing or producing unlimited population growth. - Use only HTML, CSS, and vanilla JavaScript. - Do not use external assets, frameworks, build tools, or multiple files. - Everything must be contained in exactly one HTML file and work immediately when opened in a modern browser. - Output only the complete HTML code.

A system prompt was added to support web rendering