Advertisement

Agent construction - Need Good Resources

Started by October 04, 2006 12:33 PM
1 comment, last by DCM 18 years, 4 months ago
The short - just recently graduated college and I'm looking to start a tech demo for a squad based ai system for personal interest and to hopefully help land a job and was wondering if anyone had any good resources for contructing agent/bot classes. I have read some books on different techniques in creating the sub systems that could go into making a squad based ai system, but they all are with the assumption you have a core agent class already in place. But before I go out and spend 50-100 bucks a pop on a book would like to know its a good valuable resource. The very long - I want the class to be as generic and extendable as possible, so im just trying to research as much as possible before jumping in and, what i know will end up happening, making very spaghetti like code branching out and intermingling with other modules every time I want to add a feature. So looking for an architecture that would allow modules to be developed seperately over time and added/removed easily. If it helps in direction some of the things im trying to accomplish, and would always accept more information on are listed below. If there are anythings that you think would be benificial or essential to an ai system, please let me know - right now im just trying to get the frame work up, so things like a combat system aren't listed - but bear in mind that some assumptions are that the agents are going to be able to shoot projectiles, engage in melee combat and move around - what im trying to answer are the who to attack, where to move, and why to defend type of questions. Although if there are particular considerations you feel should be taken seriously that might be overlooked feel free to mention them such as varying weapon strength for different agents in a squad for example. Enviornment Trigger System - basically making "smart" worlds, with the classic Sims example where a hotdog stand emmits a food trigger and agents based on a personal bit field can respond accordingly to the world if he is hungry. But instead of a hotdog stand it could be anything particularily with the idea of being able to dull sences of agents, making them blind, deaf, etc. I have the trigger system laid out, but looking for good ideas on how add the listener type class to the agent. Would like to use the system for different things like tactical positions(cover areas, ambush spots, pinch areas, etc.) and other things, not just sensing information like hearing a gun fire, or seeing a control lever. So wondering if i should have seperate trigger/listener classes, and almost "decorate" the different agent classes with the different listeners, commanders might have tactical listeners and sensing ones, but soldiers only sensing for example - and just a general idea of going about achieving this type of feel in an elegant manner. Combat Situations - some ideas i've looked into are Influence Maps to help commander type ai's have a concrete idea of the battle field, where enemies are known, strengths, etc. and be able to send subordinate squads out intelligently to defend or seize strategic locations. I have an idea of how to implement an influence map its not terribly complicated, but any ideas of how to construct a squad level combat situation based on seen agents, their positions, cover, distance, and the squads itself situation and be able to present it in a fasion that i would be able to analyze it easily and execute formations/maneuvers, etc. are things that i would love to have additional resources on. The whole abstraction of a combat situation is something that i have not done a lot of work with so any direction in this area is appreciated. Emmergent Behaviors + Calculated Maneuvers - kind of bleeded in from the combat situation, but one thing I want to achieve is the feel of "emmergent behaviors" in my soldier ai to get an almost like flocking type feel that is very natural. So im trying to find a good architecture for accomplishing progressive behaviors that will change every couple of frames, but will link together and produce actions that look fluent. I've looked into adding a decreasing weight to chosen actions so in the decision process for choosing what to do next, the agent will continue on a chosen action untill something over weighs the current one to prevent action/state thrashing. Its still something i'm interested in looking further into. The opposite of the emmergent behavior spectrum are calculated maneuvers. While i want this sence of the agents reacting to the world and other agents, i also want the extendability if the commander/officer ai tells the squad to guard all the exits of a building or town it will over ride any other emmergent desires like being hungry and seeing food on the table. I've heard of again adding weights, or points to commands or actions, so a guard command could be given 100pts, and hungry only 5 to force agents to behave in a calculated and grouped manner but dont know if that is the best way to go about adding calculated squad behvior and manaeuvers. Command Hierachies - because im trying to achieve this progressive, emmergent type ai feel, i want to achieve a command hierarchy where soldiers pass information up the hierarchy, and commanders pass orders down the hierarchy to constantly have new influences pumped into the agents. This seems like a good way to add another level of depth and pipelining to the ai, allowing communication to be cut off in the middle of the hierarchy. Pathing - ive written some optomized a* and node mesh stuff in the past so im pretty confident i'll be able to integrate some sort of pathing aspects, but pathing too will be fitting into the agent class somewhere as well. However, any resources that give insight on good/better pathing techniques for what im trying to achieve are welcome as well. Those are the core things I want to achieve for now(interested in learning too so if you know any really good books on the subject feel free to respond), but to sum up: I have some resources on the things described above (predominately rabin's ai wisdom1, gamma's design patterns, and mcshaffrys game coding) but always interested in more good research on them, and in need of feedback/resources explaining good technique for constructing a robust agent class. p.s. any tips on good technique for writing diagnotic displays is appreciated too. What is good information to display on screen, whats good log info, where to display - billboard it on agents, throw it on a hud, etc. i've always done simple things when i write, but never anything really in depth and since i intend to spend a bit of time on this demo i would be interested in any advice in this department as well.
My experience with AI is that the design of your agent class is entirely dependant on the results you want to get. There is no good generic solution to Agent design that will transfer well across different functional specifications. So...figure out what you are going to design first, then design the agent specifically for that task. In my experience you learn more by trying designs and failing with them than by copying someone else's design.

As for books. I love the following:
Artificial Intelligence: A Modern Approach (you can find it on amazon)
AI Game Programming Wisdom

-me
Advertisement
I have not heard of the book AI: a modern approach, I'll have to check that out.

I agree you do learn a lot by failing, but there is the idea of history and not making mistakes made in the past. I have on a few occasions designed something from scratch and it failing horribly only to find similar solutions that could have helped me reached my goal a month later reading an article or book.

There is an old code saying "I saved one day of planning by spending ten days coding" =)

Plus knowing a multitude of known, well defined techniques have lead me to produce better, tighter code. Why spend the time reinventing the wheel when you could be using the wheel and a chain to make some wicked snow tires, thats probably not the best analogy but the idea that any good technique has merit and grabing good stuff from different sources will lend to better outputs more reliably. Hence the post, need more good input! =)

This topic is closed to new replies.

Advertisement