Remix.run Logo
Show HN: Watch 14-Byte AI "brains" attempt to solve a 2D maze (Its hard)(con-dog.github.io)
24 points by purple-leafy a day ago | 9 comments

Hey HackerNews,

I built this project over the last few weeks as a palette cleanser from a failed game launch.

I wanted to learn a bit about AI/Neural-Networks and naively thought I could build a tiny maze-solving AI in a weekend with a 100% solve rate.

Well - I couldn't, but I got pretty close. 14 Bytes total model size, and a 96.5% solve rate on unseen mazes. Trained across 46 phases experimenting with different ideas to improve the model (better performance, smaller size).

Its quite fun to watch the model attempt to solve the maze, when they fail its usually due to getting stuck in a loop. The models have no access to coordinates, map-data, or external memory scratches - they must navigate using only immediate local neighbourhood observations.

There is a model dropdown and you can see how the model has progressed over each phase, constantly getting smaller and increasing its solve rate. Total trained models number in the thousands - I just expose the winning models from each phase.

Overall a fun experiment, with much implementation help from AI agents to scaffold and implement the code (I'm a lazy software dev).

iwhalen a day ago | parent | next [-]

If your goal is to get the network as small as possible, you could try using NEAT[1]. A cool example of a small network for a hard task using NEAT is MarI/O[2].

[1]: https://en.wikipedia.org/wiki/Neuroevolution_of_augmenting_t...

[2]: https://www.youtube.com/watch?v=qv6UVOQ0F44

purple-leafy 21 hours ago | parent [-]

I will be reading this one asap, my goal is as small as possible ! So far 14 bytes has been hard for me to beat

vunderba a day ago | parent | prev | next [-]

Neat! Maybe consider doing a longer postmortem/blog post on this.

Small bit of feedback: it might help to add an explicit small (i) icon for areas which contain tooltips especially for interfaces (phones) that don't support hover events. I discovered that the models (such as pareto-r1) had additional information by complete accident~

purple-leafy 21 hours ago | parent [-]

Thank you for your feedback!

I definitely will be - my experimentation outpaced my understanding a bit, so I’m slowing down to understand and verify my exact claims.

One of the most fun projects I have ever worked on and I’m excited to share the discoveries.

What kind of postmortem would you like to see? A blog or a hackernews post? And what interests you the most? Is it the compression, the visuals, the neural networks, the discoveries, or something else?

I will update the frontend based on the icon feedback for sure :) thank you!

mbe24 7 hours ago | parent | prev | next [-]

Thanks! This is inspires me to learn about AI / NN. Can you share some information on your tech stack?

purple-leafy a day ago | parent | prev | next [-]

Facts:

- 14 Bytes does not include the runtime! - All that counts towards the 14 Bytes is the model weights - Lack of git history is because my actual repo is private, this is just the frontend for now + models

elil17 a day ago | parent | prev | next [-]

I would love to understand what the inputs actually are. Very neat visualization.

purple-leafy 21 hours ago | parent [-]

Thank you I will update the frontend with a legend and some better alignment understanding with the visuals.

As a quick note, they are mostly immediate environment observations like “is there a wall in front of me, to my left, to my right” etc or “was my last move illegal”.

But every model is different, some have very rich input information like “there is a wall diagonal to my front right” and some only have very coarse inputs.

Because I have trained over 2000 models now I need to go back and get an LLM to label the inputs for me, definitely not a manual task :)

zaydmulani a day ago | parent | prev [-]

[dead]