Tuesday, January 24, 2017

OODA Loop Strat

Deciding To Use A Decision Cycle

I recommend looking into the military strategy called Observe-Orient-Decide-Act or OODA for short. Here is the Wikipedia page about it. Basically it is a really good concept to implement and a nice frame of mind to have. It will help you keep your actions focused and overall your bot more effective.

The Gist Of It

Instead of blindly hacking away at your spaghetti code, filling in the gaps as you go when you think of more/better strategies, try this. No matter what you are coding keep it within the OODA loop. Always make sure your logic follows these four steps and in this order.

1) Observe

Each time a unit takes its turn have him preform his actions by first pulling together any available information. This can be from the broadcast channels as well as from sensing nearby objects/dangers/resources.

2) Orient

This is where you want to try and use some prior knowledge to make an inference as to what you believe is going on. Are you pinned down and can't move? Are you under heavy attack? Are you about to die?

How can you apply the knowledge you have not only of your state but the state of the entire map or the entire match for that matter? Using what you have known and what you now know, do your best to figure out what is going on.

3) Decide

Now that you have properly assessed your surroundings and yourself, it's time to choose what to do. Your units can be built to do tasks very well. You can even delegate tasks to have units, even of the same type, doing different tasks for you. This is great, but by following an OODA loop for each unit you can now use those same strengths more effectively.

Instead of hard-coding tasks and blindly delegating to units, you are now in the mindset of dynamically assigning goals/tasks based on actual game play. Once you are able to accomplish this concept, you will see it's a game changer.

4) Act

There's nothing to it but to do it. By this point you have done your homework and decided if your unit needs to use this turn to focus on aggression, evasion, exploration or development. Make it hap'n capt'n, and quickly before you run out of bytecode.

Rinse And Repeat

Keep following this circle of logic to guide your decisions. Each unit on each of its turns should in some way step through this logic loop.