Advertisement

AI priority theory

Started by October 23, 2005 04:53 PM
10 comments, last by chuck22 19 years ago
ok i'm understanding that a little bit more. thanks.

this saturday i'll try to get a working example of applying this AI method to a very simple example.

if anyone knows of any examples that i can look at so i can get a head start on the setup part, i'd appreciate it.
i was looking around and saw this java game

http://www.frontiernet.net/~imaging/lunar_lander_game.html

i think that this would be a good game to insert an AI class into. the game is very simple. the AI would have access to it's height, speed, fuel, direction, etc. giving it 'eyes' wouldn't be that hard either.

then i'll implement priorities like this. this first priority is obviously

1. stay alive

in order to achieve that the AI must have a sufficient amount of fuel to navigate around, and also be able to avoid obstacles.

2. keep fuel above x%
2. avoid obstacles

i put these at equal priorities because they are directly dependant upon each other. lots of fuel + no navigational controls = dead. no fuel + efficient navigation = dead. without either, priority 1 will not be accomplished.

(by the way as i started typing this i realized that this needs to be less of a priority list and more of a priority tree, which i know has probably been implemented before, but i'm going to try it my way just for the sake of learning hands on, or to see if my implementation is any better)

the things necessary to achieve both 2nd priorities would be to observe the environment and use mathematic/physics calcutions to predict needed actions. to break it down i'll just say:

3. see the environment
3. predict collisions from current velocity and direction
3. predict and act on actions to avoid the collisions/land on landing pads safely

again without one of those three then all of them fail. no eyes = just plain dead. no sense of predicting the future = dead without warning. unable to avoid collisions = dead thrice.

a last priority of the game would be to get the highest score possible. i was debating whether or not this should be the last or first priority because if the ship is dead it can't get a high score. but then again a high score is not necessary to stay alive...so maybe it should be first priority. either way here's what both trees will look like

---------------stay alive
----------_____________________
----------|--------------------|
--------fuel------------obstacle avoidance
--________________________________________
--|---------------|-----------------------|
eyes--------predict crash----------fly/land safely
---------------______________
---------------------|
---------------get high score


or


---------------get high score
----------------__________
---------------------|
----------------stay alive
----------_____________________
----------|--------------------|
--------fuel------------obstacle avoidance
--________________________________________
--|---------------|-----------------------|
eyes--------predict crash----------fly/land safely



the second tree seems more fitting. but i am still undecided on where to put the score.



to those that are following this idea, how would you prioritize this game? or what modifications to mine should i make?

This topic is closed to new replies.

Advertisement