What method(s) could I use here?

G

Guest

Guest
Archived from groups: comp.ai,comp.ai.games (More info?)

Hello everyone,

I'm finishing up some AI that I've developed for a Bomberman
clone and am having a little trouble determining how to
measure the agents' "interest" in the various plans (go to a
powerup, drop a bomb at X to destroy crates to get powerups,
drop a bomb at Y to hopefully kill a player, etc...)

As an example, let's take the plan to "Get A Powerup that is
present in the level". The inputs that might determine how
interested we are in this would be:

- how good is the powerup (0=bad, 1=nothing special,
2=great). This measures the difference between "Slow" and
"Fire" perhaps.

- the distance to the powerup from here (maybe in between 1
and 10, 10 being the farthest away).

- would it help any other players in the world (0=nope, 1=a
little, 2=a lot)

I have about seven plans that all have differing inputs like
the ones above and I am at a loss for what system to use in
determing each plan's "interest" level. Fuzzy logic or
fuzzy data sets seem applicable when a group of inputs can
be related to a range of actions, but here the actions have
specific inputs.

I'd like to avoid using any simple x * ( ( y + 0.6 ) * 1.2 )
hardcoded formulas for the "interest" as well. If possible.

This was my first venture into AI programming, so please be
as beginner-level as possible in your responses :)

Thanks,
Mike

[ comp.ai is moderated. To submit, just post and be patient, or if ]
[ that fails mail your article to <comp-ai@moderators.isc.org>, and ]
[ ask your news administrator to fix the problems with your system. ]
 
Archived from groups: comp.ai.games (More info?)

Mike Frayn <redcrocodile@hotmail.com> wrote in message news:<4082d873$1@news.unimelb.edu.au>...
> Hello everyone,
>
> I'm finishing up some AI that I've developed for a Bomberman
> clone and am having a little trouble determining how to
> measure the agents' "interest" in the various plans (go to a
> powerup, drop a bomb at X to destroy crates to get powerups,
> drop a bomb at Y to hopefully kill a player, etc...)

Maybe I don't understand your design correctly, but I'm not convinced
about modeling Bomberman actions as planning goals to choose, because
they are overlapping and nonexclusive: the same bomb can open crates,
endanger players, destroy powerups (*), constrain movement, etc.
I would plan only one step and bomb drop at a time, evaluating all
alternatives (drop/not drop, north/south/east/west/stop) every turn
according to various criteria.
Bomberman requires rapid reactions and the abundance of temporary
obstacles (the bombs) and opportunities (other characters moving)
means any long-term plan is often suspendeded or canceled.

> As an example, let's take the plan to "Get A Powerup that is
> present in the level". The inputs that might determine how
> interested we are in this would be:
>
> - how good is the powerup (0=bad, 1=nothing special,
> 2=great). This measures the difference between "Slow" and
> "Fire" perhaps.
>
> - the distance to the powerup from here (maybe in between 1
> and 10, 10 being the farthest away).
> - would it help any other players in the world (0=nope, 1=a
> little, 2=a lot)
>

Distance itself isn't very important, unless the powerup is needed
urgently (not likely); the character should either go for the powerup
or renounce completely because an opponent can reach it first or
because it will time out (*) before it can be reached.
A more useful quantity is the expected number of powerups earned per
turn, which can be used to plan which crates should be opened (as many
as possible with every bomb, near to the player, etc.).

> I have about seven plans that all have differing inputs like
> the ones above and I am at a loss for what system to use in
> determing each plan's "interest" level. Fuzzy logic or
> fuzzy data sets seem applicable when a group of inputs can
> be related to a range of actions, but here the actions have
> specific inputs.
>

As I said above, selecting and evaluating plans is mostly pointless
because they are all good: you should instead use plans to evaluate
individual moves, for example by summing their usefulness with respect
to different goals.
Consider setting priorities:
1) dodging a bomb at the last acceptable moment
2) dropping a bomb that traps an opponent and leaves you an escape
route (i.e. a sure and safe kill) (**)
3) any safe move or bomb considered useful for you or dangerous for
some opponent.

> I'd like to avoid using any simple x * ( ( y + 0.6 ) * 1.2 )
> hardcoded formulas for the "interest" as well. If possible.
>

Fuzzy logic and probability calculations are full of formulas; they
are the only way to perform quantitative reasoning. You can extract
the arbitrary values from your expressions as constants in your code
or, if it seems useful, in editable configuration files; you could
also obtain different opponent behaviours by using the same code with
different parameters.

> This was my first venture into AI programming, so please be
> as beginner-level as possible in your responses :)
>
> Thanks,
> Mike
>

Lorenzo Gatti

* maybe not in all variants.
** ranked below self-preserving moves because suicide attacks are
rather sick.