Advertisement

Any help required?

Started by August 10, 2001 07:28 PM
48 comments, last by Mathematix 23 years, 3 months ago
quote: Original post by MikeD

I''ve got a feeling that the majority of the ways I''d use an ANN would be quite similar to the ways an IM would be implemented in the same situation. Like with any AI, you take a set of information about the environment to develop a solution to a question. If IMs are a comparative quality mechanism for positional placing of a task (handled by other AI) then my answer is the same for the camping question as it is for the building placement question. Take the inputs from the agent state (health, weaponry, armour etc.) and the current state of the world and decide upon a course of action. If it''s decided that camping for health or a weapon or something else is necessitated then use the IM or ANN on each node of the world to find the quality of camping for that item. The polling system will give you the best node and you camp it until you get what you want or your/the world state changes for some other reason.

Sound simple enough?

Mike



The more we compare IMs and ANNs, I get the same feeling. Although, I would suggest
that the classifying and associating capabilities of ANNs extend beyond that of IMs.

Ok, how about a different decision in a RTS? Given a set of goals (conquer the world),
what should the computer player research next (assuming research into technology or
magic is a part of the game)? How would we approach that AI Decision with an ANN?

Eric
Having never worked on an RTS before(I want to, so I really should think about these things ) I can only give my inexpert opinion.

The way I see decision making processes working on an RTS is by some layered hierarchy. This makes sense because you have general goals that have to be carried out in specific ways using strategy (general ''higher'' methods) and tactics (specific ''lower'' methods). You want to win a battle, so there are general decisions being made based on a general context of the world state, at the highest level. These decisions filter down restricting the later choices.
For instance, a general decision may be what kind of technology to build. On a battlefield with less than 10% water, a huge fleet would be ridiculous. On a battlefield with tight passes and harsh terrain a large airfleet would be the sensible choice. This kind of general strategy would affect any research decisions made.

An interesting idea would be that many different general strategies would be of equal fitness, or reasonably equal. If you started evolution of an ANN from a random startpoint then each time you would come up with a solution that was of good value but with a different underlying strategy. This could produce different enemy AI personalities.

Anyway, to be specific about what to research, if different strategies, based on world states, indicated an intended course of action then lines of research would direct the AI quite quickly to the areas that would get the equipment defined by the strategy built the fastest.

The hierarchy of decision making might look something like

World State -> Strategy -> Required Army Structure -> Necessary Development Facilities -> Research Topics

This is certainly very general but leaves the ANN''s solving the problems in the same kind of ways as we''ve been doing recently, in a very IM style. I''m actually quite surprised we haven''t thought of an AI problem that would be solved by ANN''s in a different way. Surely someone must have a different way of doing it?

Mike
Advertisement
I suspect I see why Mike''s description of the building placement problem and the IM solution to it are the same. Essentially, in any given location of a given map, there is an inherent quality of that location with regards to the placement of a building. The success of the mission is (probably) a function of this quality (and other things). The ANN is trained to learn this quality by using many battles as a training set, to try and isolate the important factors that influence the quality of the location. The IM is designed by ''experts'' with these factors in mind and the rules for their interaction. This is essentially the difference between expert systems and learning systems. they both tackle the same task but in different ways.

Personally, I would not use an ANN for the building placement problem. The IM sounds like a good method as it has a clear semantics... something that the level designers need! My preference would be to use decision theory though. For each map location compute the expected utility of the building being placed there. Choose the location that maximises this expected utility. This is very similar to the IM method of course.

As for the research problem, that is definitely one for decision theory, rather than learning. Why? Because we''re talking about a planning problem where we have constraints. Static ANNs are not useful where there are many paths to the goal and we want to be able to consider any of them. They will tend to learn just one path to the goal and always use that.

Timkin
quote: Original post by Timkin
Personally, I would not use an ANN for the building placement problem. The IM sounds like a good method as it has a clear semantics... something that the level designers need!


I totally agree on this point. The problem with ANN''s is that they are too abstracted to be much use to anyone in terms of design. Unless of course you build your level designers a GA manager and they do the evolution for you. Which might actually work.

quote: Original post by Timkin
Static ANNs are not useful where there are many paths to the goal and we want to be able to consider any of them. They will tend to learn just one path to the goal and always use that.


There are two rebuffs to this question. First of all, in a complex world, you''ll never get exactly the same world state twice (except, very briefly, at the begining of a preset level), so each time the ANN will come up with a subtley, or perhaps hugely, different answer. I also suggested having different ANN''s for different enemy AI''s to give them personality.

Secondly, you don''t have to use static ANN''s. If you try a continuous-time neuron model, such as Randy Beer''s dynamic neurons (yes an actualy AI academic''s name, I didn''t make it up) then you will have decisions based on the entirety of the game to date. If anyone''s interested I''ll explain how dynamic neurons work, they''re pretty simple but the behaviours you attain are very different.

I''m not disagreeing with your point that other AI''s might be more suitable, but this debate has rather taken the point of "what if we had to use ANN''s".

Mike



quote: Original post by MikeD
Having never worked on an RTS before(I want to, so I really should think about these things ) I can only give my inexpert opinion.


I do not think there is any one right or wrong answer to this question. Just differing opinions
and experiences based on what one has and has not tried.


quote:
The way I see decision making processes working on an RTS is by some layered hierarchy. This makes sense because you have general goals that have to be carried out in specific ways using strategy (general ''higher'' methods) and tactics (specific ''lower'' methods). You want to win a battle, so there are general decisions being made based on a general context of the world state, at the highest level. These decisions filter down restricting the later choices.


Layered AI is how I''ve done many of my last few game AIs. A high level strategic AI that manages the
goals of that computer player. Then a lower level AI that directs the performance of the tasks that
accomplish the goals.


quote:
An interesting idea would be that many different general strategies would be of equal fitness, or reasonably equal. If you started evolution of an ANN from a random startpoint then each time you would come up with a solution that was of good value but with a different underlying strategy. This could produce different enemy AI personalities.

Anyway, to be specific about what to research, if different strategies, based on world states, indicated an intended course of action then lines of research would direct the AI quite quickly to the areas that would get the equipment defined by the strategy built the fastest.

The hierarchy of decision making might look something like

World State -> Strategy -> Required Army Structure -> Necessary Development Facilities -> Research Topics

This is certainly very general but leaves the ANN''s solving the problems in the same kind of ways as we''ve been doing recently, in a very IM style. I''m actually quite surprised we haven''t thought of an AI problem that would be solved by ANN''s in a different way. Surely someone must have a different way of doing it?

Mike


The approach you describe is certainly doable, and worth implementing to determine how well it works.

I think I would tend to set IMs aside, in solving the "what to research next" problem, and approach
it with an Expert System that has built-in knowledge of the application of the various research
topics. I''m not saying this is a better approach than ANNs, just the one I would take. I consider
the problem more of a planning problem and less of an optimization problem. I would even deploy
multiple knowledge bases (or at least include some optional data) to effect various AI "personalities".

Ok, you pick a problem in a FPS, RTS or Adventure game?

Eric
Okay, here''s a hard one just to show the limitations of ANN''s. Imagine you had an RPG with a natural language interface, is there any way an ANN could be useful in language parsing or production?

Mike
Advertisement
quote: Original post by Timkin
Original post by Mathematix

My experience comes from the academic world; developing nets to dianose medical conditions and the like.


Do you have any references to published articles from your research team Mathematix? I would be interested to read of the application of ANNs to medical diagnosis as I work in the field of Bayesian Networks which are another popular technique for diagnosis problems (and have been used widely in medical diagnosis). In particular, I would like to see how the problem is tackled with an ANN and compare the differences between ANNs and BNs on the problem… particularly performance wise.

Cheers,

Timkin



Hello Timkin,

Mine was a very brave, solo venture that actually went somewhere! I had decided to determine why neural nets were not generally used for medical diagnosis. I was always hearing of solutions to such problems provided by expert systems and the like. I haven''t been searching for research papers in the last two years or so regarding this topic, but at the time, I was made to research the actual medical condition (multiple sclerosis) and look at the various neural network architectures available and develop a network to solve the problem. I hasten to add that I did not always have success! This was due to the fact that certain medical conditions have an awful lot of symptoms that can result in a very big neural net that can take ages to train. It kinda taught me why they may not be quite suitable for such an application.

I have only just returned to neural nets and other AI after taking up mathematics and other programming as a hobby. The references that I have to offer will be outdated, so it may be best to not advise you of these.

If you visit www.bcs.org.uk, there is a specialist AI group comprised of UK academics who may be able to point you in more up-to-date directions.

Regards,
Mathematix.


quote: Original post by Timkin
Static ANNs are not useful where there are many paths to the goal and we want to be able to consider any of them. They will tend to learn just one path to the goal and always use that.

quote: Original post by MikeD
There are two rebuffs to this question. First of all, in a complex world, you''ll never get exactly the same world state twice (except, very briefly, at the begining of a preset level), so each time the ANN will come up with a subtley, or perhaps hugely, different answer. I also suggested having different ANN''s for different enemy AI''s to give them personality.


Okay, so now you are talking about a dynamic network that has learned temporal correlations between states. A dynamic ANN of sufficient complexity to handle planning within a complex world - even one as highly constrained as a FPS game - is not feasible any time soon.

Note though that I said static network. Which may have been a misuse of terminology, but what I meant was a network trained offline on a set of training instances - where the input data were states and the output data movement actions - and that no learning occured online. It may have been wrong of me to suggest that the ANN would learn only ONE path to the goal, but unless it saw a large sector of the state space as training data, then it may certainly find regions of the state space for which it cannot return a suitable action. In which case, it will resort to the ''closest'' fit action, which may not be a good action to perform in that situation.

If a large amount of the state space was available for training, then an ANN wouldn''t be necessary for the planning task.

quote: Original post by MikeD
Secondly, you don''t have to use static ANN''s. If you try a continuous-time neuron model, such as Randy Beer''s dynamic neurons (yes an actualy AI academic''s name, I didn''t make it up) then you will have decisions based on the entirety of the game to date.


Ah, now we''re getting closer to what we would need for planning. Dynamic neurons can, to my understanding, learn temporal correlations and hence can model dynamic processes. Again though, the problem is one of complexity and if you could get an ANN to work on the problem, then existing methods would do as well.


quote: Original post by MikeD
I''m not disagreeing with your point that other AI''s might be more suitable, but this debate has rather taken the point of "what if we had to use ANN''s".

Yes, I concur. My point was more of a sidebar, trying to sell other technologies that get overlooked because of the buzzwords ''neural network'' and ''genetic algorithm''. Forgive me!

Timkin
quote: Original post by MikeD
Okay, here''s a hard one just to show the limitations of ANN''s. Imagine you had an RPG with a natural language interface, is there any way an ANN could be useful in language parsing or production?

Mike


I am assuming we are only considering English?

I think so, but I''m not a NLP expert by any stretch of the imagination. I did develop the
content recognition side to a voice recognition implementation of Spoken Voice Commands
in a FPS back in 1997. We used the ANN-based IBM Via-Voice Libraries to provide the
support for recognizing the speech, and for generating strings of recognized word tokens.
Those word tokens were input into my content recognition sub-system, which in turn
applied context and translated the result into AI understandable command messages.
Those command messages were sent to NPCs who then performed the requested actions.

If we skip the voice recognition aspect, and assume the user is keying in text strings,
then I think we might have use of a properly designed ANN to provide some support
for content recognition (due to the patterns that language tends to follow). Of course,
another approach is to create a database of content based on token strings, and then
do a loop-up after parsing to obtain content (that is what I did in REV in 1997).

As to assigning context to the interpreted tokens, I don''t know enough about ANNs to
be able to think of a way to do this. In REV, I used an Expert System to assign context
and it seemed to work acceptably, although it was brittle with regards to new commands.

Other suggestions?

Eric
Although im not an expert in AIs, yet, I think evolving n sized NNs with n sized layers with n amount of weights is the best way for "evolving" stratagy into the NNs. Its just like breeding race horses. You take the fastest, and get them to "do the nasty". Also with GAs, there is more control over how the NN works because you, the programmer, sets whats "good" and whats "bad" for the fitness of the NNs GA. example: The NN just killed some guy, +2. The NN just ran off a cliff and died, -2. and so on. of course, with games, you need to preevolve the NNs that you want in your final game. I dont think i would play Q3 if the first level, all the bots ran in circles, and in the last level i couldn''t breath without being destroyed. But that is just my thoughs on the subject.

This topic is closed to new replies.

Advertisement