Inspiration
After watching this YouTube video from Sebastian Lague, we were interested in creating a slime mould simulation as it is known to form a very efficient transport network as it searches for food. This simulation can be used to plan transportation networks, show how cancer may grow, or create cool art without using actual slime moulds.
What it does
The simulation allows you to add 'slime agents' to the screen that are attracted to each other and to form these networks. The behaviour of these agents may be customized through the menu, including their sensory range, speed, steer factor, lifespan, and colour. Agents of different colours avoid and move away from one another, and points of interest may be added using right-click to place spots for agents to move to. Additional agents may be added by left-clicking on the screen or setting up a spawner using shift + right-click.
How we built it
The simulation was created with unity and was done in a compute shader to simulate loads of agents simultaneously. Each agent casts three rays (to the left, forwards, and right) and evaluates the weighting of each direction. The agent will favour rays with agents of its own or points of interest, and disfavour those of an opposite colour. The weighting of each direction will be compared, and the agent will rotate toward the direction with the highest weighting.
Challenges we ran into
We ran into quite a few challenges, some taking much longer to solve than others. Here are a few of them:
- Deciding on a method for scanning nearby objects
- Determining an appropriate level of 'randomness' in our agents
- Balancing between moving towards points of interest and other agents
- Adding multiple colours that avoid each other. Adding this feature created many bugs with how agents interacted with each other and points of interest.
Accomplishments that we're proud of
Creating this simulation and fixing all the bugs with a beginner-level hacker. We were able to push through and solve nearly all of our issues, despite being a team of two with one first-time hacker with beginner-level computer science skills.
What we learned
We learned many teamwork skills, especially working with people we had never met and with different skill levels. Although one was a beginner, he could still contribute to the project (by debugging and planning) while learning more about coding, to make our project a success.
What's next for Slime Sense: The Mould Migration Model
Continuing to refine the weightings and discover the best menu options for certain applications. The simulation requires a balance between multiple factors: attraction to other agents of the same colour, repulsion to other agents of a different colour, and attraction to the points of interest. When all three features are used simultaneously, it is hard to decide how much each factor should be weighted. We want to continue to refine these weightings and discover which weightings and user-inputted values best simulate specific scenarios. We would also like to further improve the runtime performance of our simulation. Currently the program is able to simulate ~30,000 slime agents at ~60fps on a RX5700XT AMD GPU and i7 9700k CPU. We think that it would also be cool if we can make appropriate adjustments to allow this program run in the background and act as a live screensaver/animated background for computers.
Log in or sign up for Devpost to join the conversation.