How many AI controllers

I have a simulation game and I’m doing the AI. AI do tasks like go to work, get food, tinker around the house etc. I’m not planning to do more than 10k people at max, I’m just wondering how this would scale? my tasks are pretty simple, mostly move here and there and then I execute code on other actors to set variables some of which comes back to blackboard.
edit: most tasks execute AI from dispatchers rather than AI controller event tick processing

Are there some limits or best practice I should take into account?

TLDR - my simulation game has AI controller instance per ‘inhabitant’ is this a bad idea? (no more than 10k inhabitants)

you ought to test it and see. Somebody could tell you one thing or another but how will you know if they are wrong?

If you see a performance problem with your test, then it will be a lot easier to diagnose where improvements can be made.

In general, if you can fake individual inhabits rather than simulating a billion small decisions, of course that is preferable, not just because of performance but also your code will be more maintanable if you deal with groups rather than individuals.

before going down the AI path I did groups but I ran into issues on how to effectively serialize some stuff, where there could be different tasks within a same group that mess with the central approach. so I had queues to manage it etc. which become really complex. So I opted on components and moved the code into individual actors which really did the trick.

1 Like