[ Login | Register ]

The Shining Source

« previous next »
Pages: [1] Print
an ai idea   (Read 14412 times)
Old Post May 14, 2004, 01:08:53 pm
#1
bEn
Shining Light *

Posts: 224

Logged
an ai idea
I thought a bit about ai for sfta and as I will be doing my master thesis about intelligent agents I thought that this approach might also work for a battle ai. It will be rather costly but the result could be interesting - so I'd like to know what you think of the following idea:

First we have two levels of intelligence:

The general that might be fixed or computed during the game and the individual ai of each of the soldiers.
There would be maybe 4 types of behvior: attack, support, retreat, get closer to the enemy (miss the right word here).
For each of the 4 types the individual calculates all possibilities. and calculates a score for each of the possibilities and multiplies it with the personal liking of this idea (sth like the character of the individual) multiplied with the liking of the ai general (so the general can give commands like attack or retreat).

The scoring itself can be based on a variety of values - like can I reach an enemy, is he wounded, are there any friendly troops that might join me (you might even include asking troops that are in hearing range here) maybe also motivation (if many of my friends die I will run) etc.

Guess it is hard to judge the idea but it might lead to a more natural way of plaing in spite of the "approach slow and try to seperate the enmies" way which was maybe the best strategy for human players in sf1/2. So what do you think?

t's not like I really care


Old Post May 18, 2004, 04:17:55 am
#2
Shining Asteroid *

Posts: 311

Logged
an ai idea
Sounds interesting.  Though I'm not big on the AI things yet, I got the idea.  The only problem I find is that, of course, this would take possibly forever and a day.  With that aside, as it  really has nothing to do with the idea itself, it gives the computer a strong advantage, and I like that.  :twisted: I think it's perfect, especially since the enemy would never move to a predictable area.

If I may add my own idea.  I'm not exactly sure how hard this would be to do, but would it be possible to make enemies start in random possitions on the field in battle.  This would increase the enemy chance of winning, as the player could never really set up a pre-battle strategy.  On the other hand, this may make your idea even harder to pull off, as character's in differant positions may not react to the 4 types of behavior.

Then again, I have hardly any idea on how much of the programming works, so if I sound really retarded, forgive me.  Remeber, I neevr chose to be dropped on my head after birth.  Cheesy


Old Post May 18, 2004, 07:32:50 am
#3
Shining Something *

Posts: 143

Logged
an ai idea
I don't think it would be that hard to program. However, it might be difficult to debug, and it might give very incoherent ennemy behavior depending of the coefficients you use.

In Shining odyssey, the ennemy very basic AI chooses (randomly or fixed) between a few strategies: Run for hero, run for weakest character, run for closest character, random of the the last three for each turn. I don't have any healing/protecting function at the moment.

However, when the ennemy runs for the hero, but doesn't reach him, if he stops close to a party member, the enemy should "think" of attacking that party member.

Check the following case:
Before move:

XXXXXXXX
HPXXXXXX
PXXXXXEX

E: Enemy (strategy: Run for hero), P: party member 1 and 2, H: hero:

After move:

XXXXXXXX
HPXXXXXX
PEXXXXXX

Which P is E going to attack? You need a second level of strategy here. Strategy 1: Run for hero, Strategy 2 (if strategy 1 impossible): Run for weakest.

Here, in addition to Ben's case, E first applies strategy1 as much as possible. Then he applies strategy2.

Of course, more subsidiary strategies could be possible.
I thought that a good idea would be allow more ennemy strategies as the ennemy's level grow. A level 1 foe would only have one strategy (run for hero and stop, even if standing close an other party member)

In Ben's algorithm in my case (provided the hero is "unreachable"), E would probably move in the same way and attack the same party member P, but the calculation would be different. It would be:
1. calculate score for attacking hero.
2. calculate score for attacking party member 1
3. calculate score for attacking party member 3
4. What's highest score? Perform chosen action.

hining Odyssey under devlopment: http://mapage.noos.fr/zylokh


Old Post May 18, 2004, 12:32:10 pm
#4
Global Moderator
Shining Spammer *

Posts: 1,096

Logged
an ai idea
Ben: I think [though I'm not authority on the matter] that what you described is pretty much how the AI was going to function in Shining Online. I'm sure Ty can clarify this, although it's probably going to completely change, but it seems like a good way of doing things, as it certainly seems to involve intelligence and decision-making, rather than just going straight for the leader.

I like the idea of seeing if there are friendly troops in earshot and calculating how long it would take them to arrive - in a massive melee situation, it would be interesting if you could call in allies from other countries, but that's for another game Tongue By the same token, I'm sure it would be useful if they could calculate the chances of being outnumbered and overwhelmed by the enemy characters present, although some could have the kamikaze "gene" Tongue

On the whole, it sounds like a really good way of doing things, and could certainly up the SF fangame ante Smiley


Pages: [1] Print 
« previous next »
Jump to:  

Powered by SMF 1.1.21 | SMF © 2013, Simple Machines