[Uh-user] Beginning work on an AI implementation design

Thomas Kinnen nihathrael at unknown-horizons.org
Sun Nov 15 17:59:16 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christoph Egger wrote:
>     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.
I was not sure about this yet, but I think it could make some sense.
Let me explain my idea of the Problems and goals a little more:
A goal is a something the AI wants to achieve. When finding out which
goal to pick, the AI has to judge the value of all the goals and pick
the goal that is best suited for the current world state. A Goal is
then accomplished by solving a set of Problems. Goal: Build School,
Problems: Enough gold, enough wood, enough space, find best place to
build, build school).

>     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
Yes, I agree, same for problems.

>  - 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
Yep, good point.
>
>  - 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.
Great idea, this could be done by using a different utility function
for judging the goals for example. Will not be easy to do though i guess.
>
>     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).
I wanted to go with one thread per AI, not multiple per AI. That would
be overkill and make more problems that solve them. But i think using
threads is pretty important as the game-play is laggy enough already
when building stuff, etc. We don't need extra lags when the AI is
calculating it's possibilities.
>     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
> ;)
Yep, I already added the interface for world data lookup to the UML
diagram in /development/uml on the AI branch.

So long,
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksAM2QACgkQ2mccRNd+9c0nAwCbBJ966N91HTg34kAuMlaN1fhK
q8AAoIG2UWhx2CZa6QilSaqe6KC2Ffjx
=Wqcv
-----END PGP SIGNATURE-----




More information about the Uh-user mailing list