[Uh-user] Beginning work on an AI implementation design
Christoph Egger
christoph at unknown-horizons.org
Sun Nov 15 16:25:43 CET 2009
On Sun, Nov 15, 2009 at 03:44:32PM +0100, Thomas Kinnen wrote:
> Hi all,
> as some of you know i am currently taking a course on artificial
> intelligence at the university, so I am kind of into AI development at
> the moment. I started working on a basic design, which will most likely
> change very often and drastically in the future to come. I thought I
> will share my progress with all of you via the mailing-list.
>
> Feel free to add any comments, I am still learning this stuff, so
> chances are high I will be writing some stuff that is not the optimum :)
>
> So here are my first ideas:
>
> = Computer Players in Unknown Horizons =
> To allow for a better single-player experience it is important to offer
> computer players
> that the human player can play with/against. Those computer
> players(AI[Artificial Intelligence] in the following)
> will have to act as similar as possible as humans playing the game, so
> that for the human
> player it feels like he would be playing against other human players,
> and not versus a
> AI. For this it is important that the AI acts upon certain goals, which
> are similar to
> goals humans set themselves when playing the game.
>
> = Requirements for an AI in Unknown Horizons =
> [..]
> - Should be able to solve problems (like not enough building space
> available)
Do you keep problems and goals separated on purpose? Once a
problem is detected it's negative could be set as a goal and pushed
through the same mechanics (problem(no more space) -> goal(find more
space)) so problems are necessary for detection but solving could be
done simply through (high priority) goals.
> - Problem solving is done by creating action plans, these consist of a
> set of commands that the AI has to execute in order to solve the problem.
> - Has to be able to execute multiple action plans at the same time (move
> ship, build stuff)
> - Should be flexible in order to implement different difficulty levels
> - Should "feel" like a human player is playing when watching it act (not
> 10 actions in one turn, etc)
> - Possibly have subgoals in one goal
I'd say having some hirarchial Abstraktion with subgoals is really
a key feature if you want to keep the whole thing
manageable. Otherwise you'll fail to formulate more advanced goals
> - Problems should be able to depend on other Problems, in order to allow
> dependencies.
> - Problems have to know if they are already solved for the current context
- Awareness of Plans that won't work any longer e.g. of interaction
of other players. So the System will have to check regularly if the
plans are still fullfillable or else replan
- For »feeling« Human, I consider it usefull to give the computer
players some kind of personality so the blue player on the map will
tend to solve some problem similarly if confronted again while the
red player does something entirely different each time.
- OK really hard to do right but would help make the opponents feel
real would be to have them interact with the player forming teams
and have some common coordination.
> == Specific technical requirements ==
> - Has to work with the game internal tick system
> - Should be threaded to make use of multi core processors and to make
> sure it does not cause the game to lag when calculating it
> possibilities
Some Game KI related books I have lying around [0] here suggest KI had
back then an impact of at most 5-7% of computional resources so I'm
not sure making that part parallel is really worth the trouble (if you
want this IMHO just push the complete KI stuff into one single thread
so you at least don't need to have lock between different KI
internals).
> - Should use the Command classes to invoke changes on the world,
> possible derived classes are needed for special AI use
If you go for a distinctive KI Thread make that a must, having a
single interface to care for all the loking stuff is really beneficial
;)
> So long, Thomas
Regards
Christoph
[0] AI Game Programming Wisdome, Charles River Media
IMHO the first part of the series is really worth reading
--
/"\ ASCII Ribbon : GPG-Key ID: 0xD49AE731
\ / Campaign : CaCert Assurer
X against HTML : Debian Maintainer
/ \ in eMails : http://www.debian.org/
http://www.christoph-egger.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.unknown-horizons.org/pipermail/uh-user/attachments/20091115/dcd51f1e/attachment.pgp>
More information about the Uh-user
mailing list