I am indeed still alive
Hello everyone I am back with a new obsession. I felt like getting away for a while from my projects so I started another project that aims to be a bit more relaxed and where I write the code myself. Writing code is slow but it is relaxing and feels more creative. In case you have not seen my earlier devlog, the project I am talking about is an economy simulation called Town Hall.
The thrill of reinventing, well. Hmmm… Basically everything?
It’s weird but this actually makes me tingle of excitement all throughout my chair-bound programmer body.
Recap
In the last devlog I added in the concept of an entity. An entity can be any thing that acts independently and who’s action affect the world around them. It can be a company, organization or person. Entities die when they have no resources, there is only a certain amount of resources in the world. Entities make their choices using their neural network brains.
The new stuff
The new things can be split up into two parts. The first part involves enhancing entities ability to understand, learn about and interact with the world around them. The second part is widening the simulation to include multiple kinds of resources, goods, innovation of goods, recipes and processes, and a world with tiles containing info about what things are on them.
How to make things think
-Without going into details about what a neural network is or how it works- This is how entities thought previously: Simple stats about the world and themselves -> hidden layers do their job -> it chooses an action. This is cool and all, but right now each entity acts like a gambler locked in a room with a newspaper. They get vague stats without knowing about the thousands of other gamblers whose actions are contributing to that newspaper. For this to not be merely gambling, we have to give them more information about the factors influencing the world.
What I wanted was to give each person knowledge about other people and the opportunity to interact with them. This means more input and output neurons. The current design is for each person to know the 200 richest people in the world, since they are the most likely to matter and be good choices to invest in. This also resembles a real-world effect where many people know of those with the most power. A more nuanced variant could also include random and geographically close people.I also wanted people to get an idea of other people’s intentions and decision-making. I could do this with a separate per-entity ‘get-to-know’ brain that looks at a target, analyzes its brain and generates weights and biases for the new input and output neurons. The get-to-know brain is double-headed so it can generate both from conclusions made by a shared network trunk.
The problem is that neural networks suck at learning from another neural network’s raw weights and biases, because they can learn to care about arbitrary positions whose meaning depends on how the rest of the network is laid out. I did some research on how to solve this and chose a method called Monomial-NFN, which basically converts a neural network into a more easily readable format. I don’t understand it well enough to explain it properly here, but the important part is its purpose.
The main innovation of this part is basically the get-to-know network.
The end
This devlog is getting too long for me to be able to explain the second (and in my opinion most exciting) part so I will leave that for the next devlog where more of that will hopefully be completed. I might also make a demo for this that is playable on the browser (and run on my poor computer, hopefully it will not get too fried), not sure if I can add it until next time and if so the UI will probably suck. Have a good day, may the stars dance with you or something.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.