[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] AI Module



On 30 March 2010 17:50, Marcus von Appen <mva@xxxxxxxxxxxx> wrote:
On, Mon Mar 29, 2010, James Ravenscroft wrote:

> Dear All,
>
> My Names is James Ravenscroft and I am an Artificial Intelligence and
> Robotics major from Aberystwyth, United Kingdom. I am interested in taking
> part in PyGame for the Google Summer Of Code.
>
> I was interested to see that a pygame 'AI' module was on the list of ideas,
> under the unsorted/incomplete section. I had a quick read through your
> mailing list and noticed that a couple of other students have also been
> interested in this field. However, I wanted to bring something new to the
> table.
>
> I appreciate that a general purpose 'AI' module is quite a difficult concept
> to explain, never mind to implement. I noticed that previous students who
> were interested in this field, were looking to implement a handful of AI
> algorithms without any particular framework or design. I wanted to look at a
> general AI construct, suitable for almost any game or simulation. I believe
> that the algorithm that carries out the AI's behaviour is less important to
> the game designer than the behaviour itself. AI algorithms are often very
> complicated and since one of PyGame's focuses is simplicity, I think it
> would be best if the various algorithms are kept out of the way of the
> PyGame users (unless users really want to play with them).

[AI introduction]

Your proposal reads quite nice, but has some drawbacks in regards of its
capabilities. From what I read so far, you are tending to state machines
based on unit/bot types, which in turn means that an overall
intelligence requires quite some efforts to control and evaluate the
unit success/failure rate.

An overall intelligence however is necessary to have some general
strategy mechanisms, long-term plans and unpredictable behaviour (in
terms of switching a strategy fast enough). This is something,
Civilization 4 suffers from pretty badly, making it predictable after
playing some games (although individual unit behaviour has grown quite
good in several mods).

A central controlling instance in the form of a cellular state machine,
neural net (or whatever else might be applicable), which can react upon
the success/failure rate of individual unit AIs in terms of an overall
strategy is something, you should consider, too.

This would allow a game developer to let the controller instance work on
the details of unit behaviour instead of considering and implementing
all edge cases on and to define and implement game goal straegies.

You might want to read Pieter Spronck's[0] papers about adaptive game AI
and online learning, which are good resources regarding 'generic',
adaptive AI systems and how one could plug in a solid learning mechanism
for such controller instances.

[0] http://ticc.uvt.nl/~pspronck/

Regards
Marcus


Marcus,

Thanks for your input and taking the time to write a length response. I completely agree with your statement, my original proposal does indeed lack any kind of controlling body or overall intelligence that would be required for any form of planning or teamwork amongst bots. I have read through a few of Pieter Spronck's papers and have gained some inspiration for my approach for this task. I also took Mark's advice and had a look through some of jdog5000's threads[1] regarding his Civilization AI mods. His work is interesting and relevant. However, I feel that much of his work might be a little too specific for my needs.

I intend to implement an all purpose 'Manager' or 'Director' (not to be confused with Valve's AI director used in Left4Dead) that uses Professor Spronck's 'rapidly adaptive game AI' to keep the player on their feet. Much of the work I looked at was researched using SPRING, an open source RTS style game [2][3]. However, I think that much of Spronck's work could be relevant in an abstract agent if the evaluation function he describes is generalized or could be automatically generated. For example, whilst the paper talks about units in an RTS [3], a feedback-action loop could be implemented for a team of bots (or even a single bot for that matter) or a family of simulated people.

My suggestion is that an AI Manager is created and subscribes to a number of computer controlled bots or units. The PyGame developer tells the AI Manager what attribute values it should try to collect from a specific unit e.g. it might be helpful for the manager to know which weapon a bot chooses to use the most and their kill to death ratio. Or, in an RTS, it might be useful for the manager to know which units are near to each other and their killcount to calculate the use of a particular militia. The article also discusses 'Difficulty Scaling' which is the concept of dynamically changing how hard the game is to play by gauging the player's performance. This could be implemented by having the AI manager take account of the player's performance in it's evaluative formula.

I appreciate I still have a little way to go. However, I feel that I am nearly ready to submit a formal proposal for this project.

I look forward to your response,

[1] http://forums.civfanatics.com/forumdisplay.php?f=245
[2] http://springrts.com/
[3] http://ticc.uvt.nl/~pspronck/pubs/Bakkes-CIG2008.pdf

--
James Ravenscroft
ravenscroftj@xxxxxxxxx