Goal: Blog... Plan: Sign-In To Blogspot, Collect Thoughts, Type
Oy vey! You know, I thought AI coding would be a walk in the park. See the sights. Get some exercise. Feel good about life. Yep, not exactly. It's actually been a big headache so far. :P I'm not sure why either... usually when the problems and dilemmas arise when it comes to my game coding I get a little glisten in my eye and plot and scheme and it all turns out... as well as it could, I suppose. But this AI stuff ain't so easy.
I think these initial woes are probably mostly due to the overwhelming choices available in the AI field already (I don't tend to do well with choices, as I'm often one of those indecisive types). Also, I think I'm one to thrive in conceptualizing these sorts of things the way I want it. Sure, in such a field as AI that's been done to death since the 50's(?) it would almost certainly be reinventing the wheel, but I would ultimately hold a greater understanding of the result, and more importantly, it would truly be "my take" on it. So, I've been doing some scheming and here's a taste...
AI Notes
Looping Logic
1. Gather Info / Build Awareness
2. Act (process plan/strategy queue if no threats present)
2. React (immediate reaction to threats found)
And an example of the queue-ing logic...
Goal: capture flag
PlanQueue: locate flag, pickup flag, return flag
StrategyQueue: locate flag
ActionQueue: locate flag
Awareness: flag found at enemy base
PlanQueue: pickup flag, return flag
StrategyQueue: go to flag, eliminate defenders, pickup flag
ActionQueue: go to flag
Awareness: 1 threat - long distance
ActionQueue: go to flag, determine threat level of Threat1
Awareness: 1 threat - no immediate threat
ActionQueue: go to flag
Awareness: reached flag
StrategyQueue: eliminate defenders, pickup flag
Awareness: 1 threat - short distance
ActionQueue: determine threat level of Threat2, go to flag
Awareness: 1 threat - engaging
ActionQueue: engage Threat2
etc.
etc.
Progress/To-Do
I managed to correct the enemy logic a bit. My enemy doesn't fly straight off the screen any more. Instead, he changes his angle and -then- flies off the screen. Oooooooooh! Well anyways, we'll see how it goes.
I think these initial woes are probably mostly due to the overwhelming choices available in the AI field already (I don't tend to do well with choices, as I'm often one of those indecisive types). Also, I think I'm one to thrive in conceptualizing these sorts of things the way I want it. Sure, in such a field as AI that's been done to death since the 50's(?) it would almost certainly be reinventing the wheel, but I would ultimately hold a greater understanding of the result, and more importantly, it would truly be "my take" on it. So, I've been doing some scheming and here's a taste...
AI Notes
Goal (long term goal - e.g. kill enemies, work, score points)
Originally thought of a Goal Queue, listing more than one, but I don't foresee an enemy living long enough to require more than one...
PlanQueue (steps to accomplish goal - e.g. capture flag, return flag, defend flag, kill enemies)
Plan to accomplish goal is determined when the goal is set. May vary based on randomness or enemy smarts...
StrategyQueue (steps to accomplish plan - e.g. locate flag, pickup flag, attack, maneuver)
Small scale to-do list. Will vary based on randomness and enemy smarts...
ActionQueue (immediate actions or reactions)
Originally thought of a Goal Queue, listing more than one, but I don't foresee an enemy living long enough to require more than one...
PlanQueue (steps to accomplish goal - e.g. capture flag, return flag, defend flag, kill enemies)
Plan to accomplish goal is determined when the goal is set. May vary based on randomness or enemy smarts...
StrategyQueue (steps to accomplish plan - e.g. locate flag, pickup flag, attack, maneuver)
Small scale to-do list. Will vary based on randomness and enemy smarts...
ActionQueue (immediate actions or reactions)
Looping Logic
1. Gather Info / Build Awareness
2. Act (process plan/strategy queue if no threats present)
2. React (immediate reaction to threats found)
And an example of the queue-ing logic...
Goal: capture flag
PlanQueue: locate flag, pickup flag, return flag
StrategyQueue: locate flag
ActionQueue: locate flag
Awareness: flag found at enemy base
PlanQueue: pickup flag, return flag
StrategyQueue: go to flag, eliminate defenders, pickup flag
ActionQueue: go to flag
Awareness: 1 threat - long distance
ActionQueue: go to flag, determine threat level of Threat1
Awareness: 1 threat - no immediate threat
ActionQueue: go to flag
Awareness: reached flag
StrategyQueue: eliminate defenders, pickup flag
Awareness: 1 threat - short distance
ActionQueue: determine threat level of Threat2, go to flag
Awareness: 1 threat - engaging
ActionQueue: engage Threat2
etc.
etc.
Progress/To-Do
I managed to correct the enemy logic a bit. My enemy doesn't fly straight off the screen any more. Instead, he changes his angle and -then- flies off the screen. Oooooooooh! Well anyways, we'll see how it goes.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home