Hacker News new | ask | show | jobs
by bullen 1626 days ago
I think NNs are going to be a challenge as complexity grows.

I'm trying to make mobs behave autonomously in my 3D action MMO.

The memory (depth) I would need for that to succeed and the processing power to do it in real-time is making my head spin.

Let's hope Raspberry 5 has some hardware to help with this.

At this point I'm probably going to have some state machine AI (think mobs in Minecraft; basically check range / view then target and loop) but instead of deterministic or purely random I'm going to add some NN randomness to the behaviour so that it can be interesting without just adding quantity (more mobs).

So the inputs would be the map topography and entities (mobs and players) and the output whether to engage or not, the backpropagation would be success rate I guess? Or am I thinking about this the wrong way?

I wonder what adding a _how_ to the same network after the _what_ would look like, probably a direction as output instead of just an entity id?

2 comments

Have you tried using something more efficient and precise, for example a flocking algorithm?

https://www.oreilly.com/library/view/ai-for-game/0596005555/...

Neural nets and machine learning in general are good for problems whose solutions are hard to hand-code. If you can hand-craft a solution there's no real need for machine learning and it might simply take up resources you need more elsewhere.

This is actually something I see as complementary, so the AI on the server has to decide the general direction and then on the client these flocking simulations can be applied for scale if you have the processing power.

I'm thinking each group of mobs has a server directed leader, who's position is server deterministic and then to save bandwidth the PvE minions and their movements can be generated on each client, just tracking when they are killed.

I'm not scared of desyncing in the details. As long as the PvP stuff is coherent.

Having experience writing crowd simulations in both games and VFX in film, I suggest you take a look at Massive, and perhaps read some of their documentation to learn how this successful implementation handles crowd simulations: https://www.massivesoftware.com/