bones-ai / rust-drive-ai

Self driving car AI in road fighter world
https://youtu.be/H7RWcNgE-6s
MIT License
105 stars 16 forks source link

MLM hack to get bevy 0.12.0 working #6

Open maraist opened 8 months ago

maraist commented 8 months ago

Your version of bevy was so ancient, it wouldn't even compile for me. I wanted to use your tool as a teaching aide for AI - though haven't figured out how I'm going to get back-propagation to work, given that "mini batches" are kind of not-answer-seeking 99.9% of the time.. Regardless, I was able to get the demo app to MOSTLY work. The caveat is that bevy_prototype_debug_lines is on bevy 0.11, and it has some wgpu incompatabilities with 0.12 right now. They're just asset loading issues so SHOULD be easy to fix (he used some removed static loader capabilities).. After a couple hours, I just said screw it, let me try and replace it with something else.. "bevy_prototype_lyon". It uses a completely different geometry renderer; you had a ResMut, and this was an Entity (loaded through Queries).. But I was using neovim instead of my editor and didn't have intellisence, so gave up, commented it out and have an app that works for everything but the ray-lines (which were definitely a cool visual aide). Either wait until prototype_debug_lines gets an update, or see if you can fix it (or I might have time later on to take another crack at it).

bones-ai commented 7 months ago

Thanks for the PR :) Apologies for the late reply,

This is an old project of mine and I didn't get a chance to update it. Trying to compile this on my machine now, I get an error due to bevy_inspector_egui, I think I'll spend some time over the weekend to get it fixed (or remove it as a dependency), I'll also have to do something wrt bevy_prototype_debug_lines failing

maraist commented 7 months ago

Yup; the project has accomplished my goals of showing a simple AI-game to reason about to my kids, so thanks for the project. I've since extended it a bunch; using the bevy 0.12 features such as gizmos for lines, multiple layers of the neural network, rt-click to add extra cars onto the road, saving/loading the winning brain each iteration, etc... I can cleanup and make another pull request, for posterity. :)

bones-ai commented 7 months ago

Awesome, I'd love to see the new changes you've made. I'm really glad that someone found my project useful :)

maraist commented 7 months ago

Alright; I updated the PR. I didn't cleanup all the commented out code; apologies. But it SHOULD work end to end.