Brainspace by loveapplegames

[raw]
made by loveapplegames for Ludum Dare 54 (COMPO)

Brainspace is a neural network design game, where you have to create neural networks to solve classification problems. You can create your own Tensorflow based deep learning system with just drag&drop! This probably needs a huge manual if you are not familiar with neural networks or matrix calculus. Below is the simplest one-layer solution to single-item problems.

brainspace-in-action-2.png

The problems involve classifying items and series of items into one of two classes, depending on particular properties of each item or series. Items have properties, like color, shape, and hatching. These are fed into the network, with each property coded into three numbers, for example red=[1,0,0], green=[0,1,0], blue=[0,0,1]. In this way, each item is coded into a feature vector. Multiple items are coded as a matrix where each row is a feature vector.

For multiple-item problems, you will need a reshape node that flattens the series of feature vectors into one big vector that can be fed into a linear layer, which can then process all information in parallel into a single output. For more difficult problems, add extra intermediate layers with multiple output features and response functions in-between. Adding more features allow the layer to express multiple aspects of the input that can be used by subsequent layers. If training plateaus, you can try adding more features in the intermediate layers.

If you feed a series directly into a linear layer, it will process each item in the series independently, and output a set of features for each. This enables feature extraction of each single item, which can be a useful preprocessing step.

A more advanced trick in a multilayer network is to use bypassing: feed outputs from early layers directly into the final layer(s) so that they have access to information in the early stage of processing. For this you will need the concatenate node, which can concatenate results from multiple outputs into one.

What about the theme?? Originally I wanted the player to be given a limited number of neurons to solve each problem, but I didn't get round to that.

I had only 2 days to make this, so it's a little buggy. There is a known problem where the system just hangs and will no longer train. I think this happens only when changing something during training. Also, the nodes and screen will only update when the input is connected to the output. I used BaklavaJS for the graph editing, and I was happy I could do non-sequential neural nets in it. It saved me a lot of time, but I ran into some limitations. It's not well documented, and load and save functionality appear broken. I hope to fix that in a postcompo version.

Spoiler alert: here's a network that solves the last problem. Actually it can be simplified and still converge to 100%, but I was showing off branching and merging here :smile: Note that it is also possible to create one neural network that solves all problems.

brainspace-in-action-4.png

Ratings

Overall 317th 3.019⭐ 29🧑‍⚖️
Fun 350th 2.426⭐ 29🧑‍⚖️
Innovation 108th 3.714⭐ 30🧑‍⚖️
Theme 354th 2.071⭐ 30🧑‍⚖️
Graphics 325th 2.643⭐ 30🧑‍⚖️
Mood 333th 2.304⭐ 25🧑‍⚖️
Given 18🗳️ 25🗨️

Feedback

tjm
03. Oct 2023 · 12:41 UTC
It's... interesting? :sweat_smile: I was able to clear the first four problems just by playing around and a layperson's intuition of how neural networks work, but that was about my limit.

I do want to come back to it later and try to understand the underlying maths a little more, though; I think with maybe a little more in the way of supporting examples this could be a very useful teaching tool?

What's there works well and feels smooth to use (and I've written enough node-based editors to know how annoying it can be), so good work; Hopefully some other players can make it further than I did!
stmate03
03. Oct 2023 · 13:12 UTC
now I'm a logic oriented person, but I have not a clue what half of the nodes do, the other half I barely know what they do, but hey I passed level 1 with great results so yay!
Endurion
03. Oct 2023 · 13:40 UTC
I do like programming games, but this is assuming too much knowledge from neural networks methinks.
I did manage to pass level 1 with a little help though ;)
Pegasus
06. Oct 2023 · 20:09 UTC
A very unique entry. I think this could be used as a base to turn into a more simplified tool to teach neural networks. If it were gamified a bit more (unlocking different nodes one by one, maybe a bit more of a graphical indication of what each node does etc.), this could easily become a really fun programming style game. Great job!
fisher2470
06. Oct 2023 · 20:18 UTC
This is addicting, but I definitely don't have the experience necessary to make it all the way to the end. Really smooth interface and a decent game to go about learning how neural networks actually work.
joey gugler
06. Oct 2023 · 20:22 UTC
In technical terms, it may seem quite impressive, but I find myself unable to fully comprehend what I am doing. I managed to resolve the initial issue, but the methods and reasons behind it elude my understanding.
Moebius
06. Oct 2023 · 20:37 UTC
Even though I had a machine learning lecture back in university, it is already a while back that I had to actually work with neural networks. Still after some tinkering around I think it's a really nice editor that you designed there. Also I like that I can play around with it and immediately see if it works or not. With bigger networks usually you have to use a super computer and that's pricey, so this is really nice for learning how to get a network to converge.

If it's really a game? I don't know. But did I have fun playing around with it? Definitely. So, well done! Especially considering you only had two days for that.
Jason Shapiro
07. Oct 2023 · 00:49 UTC
I finished the Coursera Machine Learning Course by Andrew Yang - maybe that isn't enough background, but I still don't understand what is going on, here. I realize that different types of hidden layers do different things, but my problem is that I don't understand the feedback I'm getting when it's wrong. I get it when the shape is wrong. I like seeing the graph get low as I train letting me know I've trained enough. But I don't know how to fix what I'm doing wrong. I tried to read the info screen and I sadly ran out of patience. :( Still, I think this is really cool. If I could figure out how it works this might be a fantastic game. Thanks for making it!
godsboss
07. Oct 2023 · 07:42 UTC
![brainspace_good_and_bad.png](///raw/760/1/z/5feed.png)

I'm confused. Is this a bug? Seems like some shapes are both good and bad?
🎤 loveapplegames
07. Oct 2023 · 08:08 UTC
@godsboss each sample represents a series of shapes with certain properties. In this case, all the shapes in the series are red.

@jason-shapiro I was thinking of visualising the network in a postcompo version, both the shapes of the involved tensors as well as the values.
candlesan
07. Oct 2023 · 08:11 UTC
I realy liked the idea of a game that could "gameify" the teaching of neural networks. I think a non-jam version that taught the concepts but in an incremental way could be very popular.
vidarn
08. Oct 2023 · 17:37 UTC
This was really interesting and fun! I'm glad I got to play it. It felt very well made and professional. I feel like I might have needed a bit more guidance as I got stuck on level 4 and couldn't quite figure out what I was doing wrong. The easier levels were really fun to solve, however!

Here's my attempt at level 4. It didn't work at all, but I don't know how to tweak it. I must have missed something in how I should set these up ![Screenshot 2023-10-08 193252.png](///raw/ce7/z/6008e.png)
🎤 loveapplegames
08. Oct 2023 · 20:13 UTC
@vidarn thanks for the feedback! Your network looks good, only it needs two layers at the end to process the data properly, with a ReLU in between. One layer only has limited capacity for learning different logical functions. If it still doesn't work, try increasing the number of features in the intermediate layers.
Dan Str
09. Oct 2023 · 05:42 UTC
cool game, keep up the good work
vidarn
09. Oct 2023 · 06:32 UTC
@loveapplegames awesome, that makes a lot of sense! I solved it now :v: Thanks a lot for the help! I'm having a lot of fun with this :grin:
henk
15. Oct 2023 · 15:28 UTC
Engrossing and educational! It's kind of meta that the game is training my personal neural network to understand how neural networks work.

It'd be nice to have some more visual understanding of what's going on, though, since I'm often in a situation where I've come up with a wrong answer but have no clue _why_ it's wrong. Maybe some numbers or shaded cells or something so I can see what the weights are or what data looks like when it passes through the nodes.

Some other ideas:
- I think there should be a "response function" dropdown on the "layer" node rather than just a "response function" node, since I'm almost always going to add one after each layer.
- Maybe an option to manually set NN weights? I'm often desperate to know whether what I've built is just training poorly or if it's not capable of representing the solution at all, and I think a way to input my own weights would help with that.

Also: Since it's possible to create an exhaustive list of test cases for some of these challenges, it'd be interesting to see what would happen if you threw _literally everything_ into the training data and tried to make a neural network that's 100% correct.
crotonyl_alcohol
20. Oct 2023 · 10:22 UTC
Nice game! I'm currently learning cv and this game shows me clearly what a rookie I am.
WiredOverload
20. Oct 2023 · 20:16 UTC
Interesting peek into behind the scenes of neural net creation, but I think I would have had a bit more fun and learned more if each puzzle had a solution you could look at or hints, as at certain points I really had no idea what I was missing.