top of page

Devlog #22 - Back to work, and experiments with genetic algorithms.

Hi all! This is our first devlog after a monthlong hiatus. This past month we had a family emergency and have been traveling a lot. As such, we have not been able to work on our games - but we are grateful and thankful that everything is okay now and we are finally able to get back to work!

This post won't be long - we just want to detail what kinds of things we have been experimenting with and our plans for the next few months.



Plans for Pumpkin

We are getting back to Pumpkin and her untitled game. Last we left off, we had implemented infrastructure for being able to place objects in the world (such as tables, plants, objects, hangers, lights, etc). We also revamped the core inventory system code so that our infrastructure is a lot smoother and cleaner.

We are now shifting back to phase 2 development. Phase 2 involves

* Building UI

* Core decorations and items modeled and implemented

* Save / Load

* Internal testing infrastructure

* Simple "green" money system

* Plant balancing

* General graphics and gameplay enhancements

After Phase 2 is complete, we should have a demo to start getting user feedback and testing. We are super excited!


Delving into AI

We have been doing some background learning on AI for some project ideas we have. This past week, we've dived into simple genetic algorithms via the wonderful Udemy course Machine Learning with Unity by Penny de Byl. In this blog post and upcoming blog posts, we want to highlight what we learn and experimented with in Unity.

Genetic Algorithms

The first unit in the Unity machine learning course focused on genetic algorithms. At first we weren't sure what to expect in terms of complexity - but this form of AI is surprisingly simple and easy to implement.

The idea behind genetic algorithms is to emulate what nature does during organism evolution. In nature, organisms come together to breed and create offspring. The organisms that have features and characteristics which let them survive their environment the best are the ones that live long enough to breed. Because of this, their children will inherit similar properties to their parents and will also have similar survival characteristics. Over time, organisms which are better and better at surviving their environment breed the most, and thus each generation becomes more adapted to their environment.

Evolution at its finest: the cute little Bulbasaur evolves over time, becoming the ferocious Venusaur! Take that predators, RAWR!

So how does this get applied to AI in games? Well stay tuned for a tech tip in the future for a detailed tutorial on how to implement a simple genetic algorithm in Unity! (based on what we learned in Penny's course).

We wanted to experiment with genetic algorithms to train little creatures to race around a track. Each time a creature makes it all the way around and hits the finish line, we breed the top creatures (the ones that made it the furthest) and create a new population of creatures! The children creatures inherit the "DNA" of their successful parents; so each population gets a little better with their environment. It only took a few generations of breeding to have a whole population of little critters going around a track, all autonomously.

The red critters learn to go around a track without direction from the player. Each time one hits the finish line, we breed the top most successful critters together to create a new population. Eventually we had an entire population that adapted to their environment!

We are so proud of our little dudes ^_^


That's all for today! Stay tuned for exciting updates to our upcoming game!

19 views0 comments
bottom of page