Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Is this the right place to ask for help about AI?



> That's a BIG point for me: how to judge a move better than another?
> If we only take care of damage done (for the attacking moves), then
> all moves with IstantKill are better than moves with normal damage,
> witch are better that all other... but IstantKill moves are much more
> long than normal moves,
> and "no.damage" moves (the ones that make ooppoent falling) are
> useless...
> and if a move is abortable, it is not better than a non abortable?
> Here i'm lost....

I think you'd better write a set of hand-made rules to decide on the
value of a move.
That is to say, give each move a value given the opponent's current
move, maybe taking also into account the players' heatlh.
Then, let's say in the current situation you have the values:
move1: 30
move2: 50
move3: 20
move4: 0
You normalize them, dividing all them by 30+50+20+0 = 100 (ok, I
cheated to get 100 ;), and it gives you a probability of the AI
performing this move :
move1 = 30%
move2 = 50%
move3 = 20%
move4 = never

The real problem would be to make the game learn the values of the
moves. I don't suggest that you try it before you have this basic
"human-crafted" stuff working.

> > Again, judge it yourself. If you want to do some more complicated
> > stuff, you may try using a genetic algorithm. Each gene would describe
> > an action (or a probability of doing an action) in a given situation,
> > and you would make your candidates fight to see who performs best.
> Here you're like talking about galaxies to a 4 year old child (i can
> prove it :) )

Okay. A genetic algorithm works like that: you have a pool of
individuals, each individual being represented by a genome (a set of
genes). The genes values (real numbers for instance, or binary, ...)
represent the individuals characteristic and behaviour. You have a
function that evaluates an individual (like, how much time it can
survive in a hostile environment). You start with random individuals,
then you pick the best ones, and you mix their genome (take 2
individuals, take one part of the genome of the first one, then the
other part of the genome of the second one). That way, you HOPE the
resulting individual will have the qualities of his 2 parents. You
iterate the process, and in the end, hopefully, you have a set of
individuals much better than the random ones you started with.
Now, applied to your barbarian problem: each gene is the action (or
probability of an action) to perform in a given situation. To evaluate
your individuals, you make them fight together, and you pick the ones
with the higher number of wins to mix them and get better fighter over
time.
That's a way to learn the values of the moves.

> > If you have a speed attribute that says how often a character can hit,
> > that will make a fast char. attack more often, no  ?
> This is related also on the opponent: with an opponent of the same
> type, being a fast char. is not an advantage. It becomes a gain when
> the opponent is "Slower than"... i think that AI must choose a
> "strategy" (a modifier in the Moves evaluation?)

I think there is a misunderstanding here. My point of view was the
following : a character will attack as fast as he can (that seems
sensible) given its attack speed rate (a value that you decided when
you created the character). Now what is exactly the problem you see
there ?

> 
> > You don't need state-of-the-art AI for a barbarian clone. Some good
> > judgement and a bit of randomness should do the trick :)
> That's another point: Now i'm trying to just clone, but my eyes looks
> far, to an "improvement" of. If you ever played "Barbarian" you will
> remember that, after all, oppenents was rolling on the ground a lot
> ('cause the only counter-move is a jump, and you have to take the
> precise time to jump)... i will try to avoid this...

I only played it a bit on my CPC, I don't really remember them
rollling ;)

Olivier



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com




Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.




Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.