Currently the bots are fairly stupid at making selections. The current approach is to check what slot a given bot is, meaning slot in the lobby, and select a hero type based on that slot. Since bots are currently scripted to fill 1 role it's reasonable to have them evaluate team roles before making a selection. Currently AP rules go:
Radiant:
Mid
Offlane
Support
Support
Safe Carry
Dire:
Mid
Safe Carry
Support
Support
Offlane
I think a better algorithm would be to check if the rest of your team has picked these roles in this order, and then if a role is available to search for a hero to fill that role. At least it'll provide better balance and variety. We also separately do random hero selection based on role incredibly inefficiently. We can do random hero selection based on role fairly easily so that should also get a rework to clean up the hero selection loop.
Currently the bots are fairly stupid at making selections. The current approach is to check what slot a given bot is, meaning slot in the lobby, and select a hero type based on that slot. Since bots are currently scripted to fill 1 role it's reasonable to have them evaluate team roles before making a selection. Currently AP rules go:
Radiant:
Dire:
I think a better algorithm would be to check if the rest of your team has picked these roles in this order, and then if a role is available to search for a hero to fill that role. At least it'll provide better balance and variety. We also separately do random hero selection based on role incredibly inefficiently. We can do random hero selection based on role fairly easily so that should also get a rework to clean up the hero selection loop.