I saw this here: https://github.com/groverburger/marufight
…and tried to adapt it to Codea, and I think it came out pretty okay.
It was originally in lua but using LÃ¶ve, which I’m not familiar with, so hopefully I got the translation close enough that it works as intended.
@UberGoober - neat version, the code will take a bit of digesting before I understand it. Thanks.
Good job! It’s a very good transplant?
Here’s a better version, it scales better to iPhone, and has lots of configurable goodies to play with.
Does anybody understand what those little boxes are that appear in the lower left when you select one of the creatures?
I’m pretty sure they’re a visual depiction of that creature’s neural net, but I don’t understand what they’re showing us.
@binaryblues — Since neural nets require lots of data to perform well, It takes a long time for interesting behavior to emerge in this—for example I had to leave it on overnight before any of the creatures figured out that moving in a straight line was better than aimlessly spinning.
Because it would be lovely to be able to save state and restore state, so that any learning done in a single session wasn’t automatically lost when the project closed, I’ve been trying to figure out how to serialize the “brain” objects, but the neural net part seems to be an infinite recursion and is flummoxing me.
Can you help me figure out how to serialized the brains?
This version has even more parameters you can control, including lifespans, and it also tracks the creatures who have existed for the most generations. Plus it has more interesting starting conditions, I think.
@UberGoober I’m Sorry I can’t help you figure out how to do, Now, I don’t know anything about neural networks, but they’re on My To-do list.