1. Computer version of Risk

Is there anyone familiar with the Milton-Bradley board game "Risk"? I
was thinking of making a computer version, but know it's too much for
me alone. I need at least one person to handle all the sprites and
graphics. (Partly because I can't draw.) Packard: *Any* help with the
AI routines for the computer controlled players would be nice. Also
one or two "general" programmers would be helpful. If anyones
interested let me know.

Joseph Martin

--
~~>E-mail:  joe at cyber-wizard.com
~~>URL: http://users.exis.net/~jam/

new topic     » topic index » view message » categorize

2. Re: Computer version of Risk

> It's been done a million times. Before you start, try playing some of the
> great computer versions, like global war (the bbs door game was way cool)

Maybe so. I haven't yet found any. (Perhaps you could tell me where?)
Besides having a native version with Euphoria source code would be
cool. Maybe the game freeware and the source code for sale.

> The games I've seen break up the world into multiple screens.  You can
> have a global map then zoom in on regions.

I'll keep that in mind.

> The AI should be pretty straightforward.

Hope so. I'm new to AI.

Joseph Martin

--
~~>E-mail:  joe at cyber-wizard.com
~~>URL: http://users.exis.net/~jam/

new topic     » goto parent     » topic index » view message » categorize

3. Re: Computer version of Risk

On Tue, 1 Jul 1997, Joseph Martin wrote:
>
> > The AI should be pretty straightforward.
>
> Hope so. I'm new to AI.
>

All AI programming is centered around 2 concepts:
1) What does the computer player know
2) What does he do about what he knows

If you ask 5 risk players how to play, you'll get at least 6 "optimal"
strategies.  Some players like to spread out all over the globe and
consume their opponents from all sides.  Some like to consolodate as much
of their armies as possible in one continent, then slowly expand their
borders.  Every player has his own agenda, his own master plan he devises
before the game begins, based on experience in previous games.  Your
computer opponents should also have their own pet strategies that they
follow as often as possible.

The "best" way to create computer AI is to make the game playable by human
players, then play about 20 games with human players and have the computer
keep track of every move of every player.  You then can "teach" the
computer to play like you do.  You need the test data to help you narrow
down when the computer needs to make which decision.  Teaching a program
to play it actually pretty fun most of the time. It takes HOURS, but it's
fun when it does what you predict it to do.

When you play your test games, take careful notes about what you do when,
what factors are you considering when you decide what to do.  The computer
player needs to do the same consideration when it needs to decide what to
do.  You might have something like "when I have less than 3 armies in a
territory and I have 5 or more I can move into that territory, I move 1-3
into it"  You make a decision list of those kinds of things, then
prioritize them.  Each different computer player will have a different
decision list with different priorities.  Perhaps one player must take
Irktusk at all costs, perhaps another wants to secure north america first,
then asia... or whatever.

Once you get the computer AI playing, you need to play balance the
players.  Computer players following a strict script will generally kick
a human player's butt every time.  If all the pacman ghosts know where
you are and always take the most direct route from where they are to
where you are, you are caught quickly, no matter how well you play.  The
game isn't fun anymore.  You need to make the AI characters do something
other than what is in their best interest sometimes.  It makes the players
less predictable.  You can tell basically what they are after and their
overall strategy, but not necessarily what they are going to do on any
particular turn.

Sometimes doing the most direct thing is hazardous to the AI player.
In OidZone, the swarm mines hunt you down, changing direction every once
in awhile to intercept you.  If I did the course correct every frame, they
go right for you and line up single file along the most direct course.
This makes them easy pickings for you.  You spin around and start shooting
and you'll get them all.  Too easy.  If I course correct every 5-10 frames
instead and give them a choice of 3 general directions towards you, they
swarm around you then close in for the kill.  Makes the game much more
challenging.  The longer the time between course correction, the larger
the swarm cloud around you.

If and when I get around to it, the next Crash Course lesson will be about
AI programming.

Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria

new topic     » goto parent     » topic index » view message » categorize

4. Re: Computer version of Risk

Cool AI stuff, Packard.....

        If you just wondering if anyone is reading those lessons, i did.
        And i would like one about AI.
        I think when someone tells evrything he knows about a concept it is
always worth the listening (or reading in this case).
        Same goes for the all-knowing-guru's you should read that stuff or
any other stuff where you can't be 100% sure that you know
every-thing.
        But i guess most of them know that or they wouldn't become a guru in
the first place.

        I wanne help on the game, althrough i know little about Risk, i
never play to many board games. I don't need to know the rules too, i
can help on grahpix routines and surroundings, the use-interface.

        Everybody seen the GFX demo with the bug out? It seems to go faster
on my machine, althrough i can't figure out why it should be faster?
        How's it speed on the slower computers?
        And does the WaitRetrace make any difference?
        Does it go smooth with ya all?

        I really want to know that stuff, i only know how fast it is on my
P-60.....

new topic     » goto parent     » topic index » view message » categorize

5. Re: Computer version of Risk

> > > The AI should be pretty straightforward.
> >
> > Hope so. I'm new to AI.

So am I, so don't accept my word as law...

> All AI programming is centered around 2 concepts:
> 1) What does the computer player know
> 2) What does he do about what he knows

Ooh.. That's a very simplistic view...

> If you ask 5 risk players how to play, you'll get at least 6 "optimal"
> strategies.
----------8<----------
strategy stuff deleted
-------->8------------

> The "best" way to create computer AI is to make the game playable by human
> players, then play about 20 games with human players and have the computer
> keep track of every move of every player.  You then can "teach" the
> computer to play like you do.

And who says you're so good? (Don't take it personally, but I'm not convinced)

----------8<----------
  more stuff deleted
-------->8------------

The normal aproach to board-game AI's is the one (normally) used for chess:

Max-Min algorithm
=================

Make a function to give each board-situation a value (score if you like).

1. Make a tree of all possible moves (except suicidal ones), and evaluate them
   (the resulting board), and cut away the most stupid moves. (lowest score)

2. For every considered move on your part, (the tree) make a move-tree for the
   opponent. Assume that he is clever too, and won't make any obviously stupid
   mistakes.. (Store these moves with the score they would give you)

3. Repeat 1&2 either to some specified depth (height of tree) or to some other
   limit...

4. Find the leaf with the highest score (for you), and make the first move in
 that
   direction...

It's only in real-time games or games with *enormous* branching that really
require something as obscure and intagible as "tactics and strategy". For Risk,
I'd write the valuation function to valuate for any player, since *each* player
is trying to *max* his own score. (If there were trying to *minimize* *your*
score, like chess AI's, they'd all gang up on you! blink  )

Hope it helps... I'll try to get some work in on the tree.e...

(Hey! Here's another use for trees!)

>>Joseph Martin
> Michael Packard <lgp at exo.com>
Anders

-------------------------------------------------------------------
Anders Eurenius <c96aes at cs.umu.se> ICQ UIN:1453793
Computer Science/Engineering student at the university of Umeaa
-------------------------------------------------------------------

new topic     » goto parent     » topic index » view message » categorize

6. Re: Computer version of Risk

On Wed, 2 Jul 1997, Anders Eurenius wrote:

> > All AI programming is centered around 2 concepts:
> > 1) What does the computer player know
> > 2) What does he do about what he knows
>
> Ooh.. That's a very simplistic view...

yup.  AI programming isn't a whoodoo voodo thing only guru's can do.  It's
just making your computer opponents aware of the game and their options,
and giving them some way of choosing their options.

> > If you ask 5 risk players how to play, you'll get at least 6 "optimal"
> > strategies.
> ----------8<----------
> strategy stuff deleted
> -------->8------------
>
> > The "best" way to create computer AI is to make the game playable by human
> > players, then play about 20 games with human players and have the computer
> > keep track of every move of every player.  You then can "teach" the
> > computer to play like you do.
>
> And who says you're so good? (Don't take it personally, but I'm not
> convinced)

It doesn't matter if you're good or not.  You know the game, you know the
rules, you give your alter ego a goal and a strategy, then watch him play
and advise him when he does something stupid.  It's really easy to teach a
computer player to play better than you do.  You won't always follow your
agenda to your best interest, you'll sometimes miss an opportunity, you'll
sometimes get desperate and do something stupid.  The computer is more
disciplined.  You give it your decision priority list and it will follow
it until it wins or loses.

> ----------8<----------
>   more stuff deleted
> -------->8------------
>
> The normal aproach to board-game AI's is the one (normally) used for chess:
>
> Max-Min algorithm
> =================
>
> Make a function to give each board-situation a value (score if you like).
>
> 1. Make a tree of all possible moves (except suicidal ones), and
>    evaluate them (the resulting board), and cut away the most stupid
>    moves. (lowest score)

In chess you do this dynamically after the opening moves.  I designed a
nifty chess program for Interplay that analyzed your moves, as well as for
the computer or modem opponent and warned you if you or they did something
stupid.  It told you why the opponent was doing what he did and what
advantage or disadvantage the move gave him.

<snip>

> It's only in real-time games or games with *enormous* branching that really
> require something as obscure and intagible as "tactics and strategy".
> For Risk, I'd write the valuation function to valuate for any player,
> since *each* player is trying to *max* his own score. (If there were
> trying to *minimize* *your* score, like chess AI's, they'd all gang up
> on you! blink  )

Strategy is ALWAYS important. Even in Chess, you have agendas, you have a
basic strategy.  A game situation is dynamic, sometimes the table
generated "optimal" move isn't the "right" move for your character this
time.  Sometimes you let the queen do her thing while you move your pieces
around.  The whole point in doing computer AI for something like RISK is
to give multiple opponents multiple personalitiess, multiple game play
agendas and options.  You need to give them some room to work around the
rules they play by.  If they always do what you expect, the game isn't
fun, you always win or you always lose.

The various "players" may or may not try to maximize their score all of
the time.  They may choose to kick your wimpy butt out of their area of
influence because you annoy them rather than do a move into africa that
will give them more points.  My AI's would taunt you at that point =)

Another example.  In StarTrek: Judgment Rites, when you were in
space combat against the Klingons,  their basic strategy was to turn their
ships toward you and shoot at you no matter where you were.  Their AI was
simple "kill the target. Stay out of their sites, cloak if possible."
They were pretty easy to destroy: get one in your sites and do whatever it
did and keep firing.  If you faced 2 or three of them, as long as you kept
one in your sights and fired, the others would have to keep turning and
moving to try and hit you.  If you kept moving, they couldn't target you
easily and you could blow up the ships one by one if you were good.

In StarFleet Academy, the Kilngon AI is slightly different. When you face
multiple klingons, they have multple attack strategies that they use when
necessary.  They form up together moving away from you, when you pursue,
one or more breaks formation and peels off away, around, behind your ship
then blasts the bejeebers out of you, then they  regroup and depending on
your damage\ability to fight, they do something else.  They like to
disable you then gang up on you for the kill.  They also learn your
tactics as you face them in combat and can anticipate your moves.  As you
play they get harder to defeat because they KNOW you better.

One way is hard and repetitive once you get the hang of it, the other is
manical and constantly challenging.

The more varied your AI the more interesting your game.

> Hope it helps... I'll try to get some work in on the tree.e...
>
> (Hey! Here's another use for trees!)

I build landscapes with nice trees. =)


Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria

new topic     » goto parent     » topic index » view message » categorize

7. Re: Computer version of Risk

Michael Packard wrote:

>In chess you do this dynamically after the opening moves.  I designed a
>nifty chess program for Interplay that analyzed your moves, as well as f=
or
>the computer or modem opponent and warned you if you or they did somethi=
ng
>stupid.  It told you why the opponent was doing what he did and what
>advantage or disadvantage the move gave him.

Hey Mike,

I'd like to see that program. Is it still available and if so, where?

Ad Rienks
Ad_Rienks at compuserve.com

new topic     » goto parent     » topic index » view message » categorize

8. Re: Computer version of Risk

On Wed, 2 Jul 1997, Ad Rienks wrote:

> Michael Packard wrote:
>
> >In chess you do this dynamically after the opening moves.  I designed a
> >nifty chess program for Interplay that analyzed your moves, as well as f=
> or
> >the computer or modem opponent and warned you if you or they did somethi=
> ng
> >stupid.  It told you why the opponent was doing what he did and what
> >advantage or disadvantage the move gave him.
>
> Hey Mike,
>
> I'd like to see that program. Is it still available and if so, where?

I'm not sure what they did with it after I left them (it was the last
project I designed for them).  It was VERY cool.  The working title was
"Chess for Kids" and had the animated pieces give situation reports after
every move, what was good, what wasn't and give advice as to what they
could do now.  It had a tactical analysis screen where you could go over
every move you could make and it would tell you the advantages and
disadvantages of that move.  It was intended to teach someone how to play
chess in a fun, non-threatening way.  They were talking about adding part
of that technology into CheckMate(tm) and their other chess programs.

I haven't seen a released product, but I haven't looked around.  Usually
they give me a free copy of the software, but they didn't the last 2
released products I designed for them (Mario Teaches Typing CD-Rom,
Mario's Game Gallery)

Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria

new topic     » goto parent     » topic index » view message » categorize

9. Re: Computer version of Risk

> released products I designed for them (Mario Teaches Typing CD-Rom,
> Mario's Game Gallery)

Hehe, we have Mario Teaches Typing at our school.  Cool.

William

new topic     » goto parent     » topic index » view message » categorize

10. Re: Computer version of Risk

> > > All AI programming is centered around 2 concepts:
> > > 1) What does the computer player know
> > > 2) What does he do about what he knows
> >
> > Ooh.. That's a very simplistic view...
>
> yup.  AI programming isn't a whoodoo voodo thing only guru's can do.  It's
> just making your computer opponents aware of the game and their options,
> and giving them some way of choosing their options.

This rhymes poorly with what you say about the klingons later...

> > > If you ask 5 risk players how to play, you'll get at least 6 "optimal"
> > > strategies.
> > ----------8<----------
> > strategy stuff deleted
> > -------->8------------
> >
> > > The "best" way to create computer AI is to make the game playable by human
> > > players, then play about 20 games with human players and have the computer
> > > keep track of every move of every player.  You then can "teach" the
> > > computer to play like you do.
> >
> > And who says you're so good? (Don't take it personally, but I'm not
> > convinced)
>
> It doesn't matter if you're good or not.  You know the game, you know the
> rules, you give your alter ego a goal and a strategy, then watch him play
> and advise him when he does something stupid.  It's really easy to teach a
> computer player to play better than you do.  You won't always follow your
> agenda to your best interest, you'll sometimes miss an opportunity, you'll
> sometimes get desperate and do something stupid.  The computer is more
> disciplined.  You give it your decision priority list and it will follow
> it until it wins or loses.

Again (Hopefully more clearly): Who says your strategy is so good?

> > The normal aproach to board-game AI's is the one (normally) used for chess:
> > Max-Min algorithm
> > =================

> In chess you do this dynamically after the opening moves.  I designed a

Yeah. My explanation wasn't that great...

> nifty chess program for Interplay that analyzed your moves, as well as for
> the computer or modem opponent and warned you if you or they did something
> stupid.  It told you why the opponent was doing what he did and what
> advantage or disadvantage the move gave him.

Was this like, a tactical/strategical expert system or did it go through the
move-tree? (Or both?)

(Sounds really cool though... How far technically did you do designs?)

> <snip>

I can relate to that... blink

> > It's only in real-time games or games with *enormous* branching that really
> > require something as obscure and intagible as "tactics and strategy".
> > For Risk, I'd write the valuation function to valuate for any player,
> > since *each* player is trying to *max* his own score. (If there were
> > trying to *minimize* *your* score, like chess AI's, they'd all gang up
> > on you! blink  )

> Strategy is ALWAYS important. Even in Chess, you have agendas, you have a
> basic strategy.  A game situation is dynamic, sometimes the table
> generated "optimal" move isn't the "right" move for your character this
> time.  Sometimes you let the queen do her thing while you move your pieces

I must admit that I really don't have the patience required for chess, but I
would like to beg to differ; in chess there are no other objectives than
checkmating you opponent. The optimal is optimal, if you go deep enough, and
the valuation is good enough.

(The valuation may very well consider positions and composition of pieces and
more, rather than just a hard point value for each surviving piece...)

> around.  The whole point in doing computer AI for something like RISK is
> to give multiple opponents multiple personalitiess, multiple game play

This is a good argument. I plead no contest.

> agendas and options.  You need to give them some room to work around the
> rules they play by.  If they always do what you expect, the game isn't
> fun, you always win or you always lose.

You'd of course have a random-factor in the choice of move-tree... Sorry I
forgot this part in my explanation of the algorithm... (Though I agree it would
be boring to always win/lose...)

> The various "players" may or may not try to maximize their score all of
> the time.  They may choose to kick your wimpy butt out of their area of
> influence because you annoy them rather than do a move into africa that
> will give them more points.  My AI's would taunt you at that point =)

This is a part of the 'character' argument, and it's good. The min-max would
always go for the points, if doesn't see a chance at something bigger comming
up later... But the valuation function could take fewer players as a good
sign...

This is how I would try to put in some strategy, because this way you can make
"soft" priorities: Even though you're an annoy little shit, the juicy deal in
Africa is just to good to let slip. Besides, you have nowhere to go, so we'll
step on your bug ass next turn...

> Another example.  In StarTrek: Judgment Rites, when you were in
> space combat against the Klingons,  their basic strategy was to turn their
> ships toward you and shoot at you no matter where you were.  Their AI was
> simple "kill the target. Stay out of their sites, cloak if possible."
>
> They were pretty easy to destroy: get one in your sites and do whatever it
> did and keep firing.  If you faced 2 or three of them, as long as you kept
> one in your sights and fired, the others would have to keep turning and
> moving to try and hit you.  If you kept moving, they couldn't target you
> easily and you could blow up the ships one by one if you were good.

Example to prove what?
(All I see is the results of a too simplistic view on AI)

> In StarFleet Academy, the Kilngon AI is slightly different. When you face
> multiple klingons, they have multple attack strategies that they use when
> necessary.  They form up together moving away from you, when you pursue,
> one or more breaks formation and peels off away, around, behind your ship
> then blasts the bejeebers out of you, then they  regroup and depending on
> your damage\ability to fight, they do something else.  They like to
> disable you then gang up on you for the kill.  They also learn your
> tactics as you face them in combat and can anticipate your moves.  As you
> play they get harder to defeat because they KNOW you better.

Like this isn't voodoo...! "Learn". Yeah, sure boss, we'll put that in before
lunch...

> One way is hard and repetitive once you get the hang of it, the other is
> manical and constantly challenging.

The max-min would prolly keep its playing style, but controlling depth and
random-factor it would probably still be tricky to beat...

> The more varied your AI the more interesting your game.

Yeah.

> I build landscapes with nice trees. =)

I see the smily, is it *only* a joke?

(Oh yeah: And be careful with equal signs around here...)

>>> Michael Packard
>> Anders Eurenius
> Michael Packard
Anders Eurenius

-------------------------------------------------------------------
Anders Eurenius <c96aes at cs.umu.se> ICQ UIN:1453793
Computer Science/Engineering student at the university of Umeaa
-------------------------------------------------------------------

new topic     » goto parent     » topic index » view message » categorize

11. Re: Computer version of Risk

On Wed, 2 Jul 1997, William Eiten wrote:

> > released products I designed for them (Mario Teaches Typing CD-Rom,
> > Mario's Game Gallery)
>
> Hehe, we have Mario Teaches Typing at our school.  Cool.

The big floating head and funny comments was my idea. =)


Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria

new topic     » goto parent     » topic index » view message » categorize

12. Re: Computer version of Risk

On Thu, 3 Jul 1997, Anders Eurenius wrote:

> > It doesn't matter if you're good or not.  You know the game, you know the
> > rules, you give your alter ego a goal and a strategy, then watch him play
> > and advise him when he does something stupid.  It's really easy to teach a
> > computer player to play better than you do.  You won't always follow your
> > agenda to your best interest, you'll sometimes miss an opportunity, you'll
> > sometimes get desperate and do something stupid.  The computer is more
> > disciplined.  You give it your decision priority list and it will follow
> > it until it wins or loses.
>
> Again (Hopefully more clearly): Who says your strategy is so good?

Nobody.  That's the point. There is no "correct" way to play RISK, just
like there is no "correct" way to play chess.  You come to the game with
some pre-formulated game plan based on your previous experience. Your
primary goal is to win the game, your secondary and tertiary goals may
differ from mine. It doesn't matter how you get where you're going as long
as you know where you are going and have a plan to get there.


> Was this like, a tactical/strategical expert system or did it go through the
> move-tree? (Or both?)

It kept track of every move of every piece then analyzed the board after
each move.  It would ask each piece what it now could do or not, then
prioritize each possibility then advise the player of his options now.
The player could view every move for every piece and it would tell the
advantages and disadvantages of every move.  Tactically, how did the
players situation change as a result of that move?

> > Strategy is ALWAYS important. Even in Chess, you have agendas, you have a
> > basic strategy.  A game situation is dynamic, sometimes the table
> > generated "optimal" move isn't the "right" move for your character this
> > time.  Sometimes you let the queen do her thing while you move your
>  pieces
>
> I must admit that I really don't have the patience required for chess, but I
> would like to beg to differ; in chess there are no other objectives than
> checkmating you opponent. The optimal is optimal, if you go deep enough, and
> the valuation is good enough.
>
> (The valuation may very well consider positions and composition of pieces and
> more, rather than just a hard point value for each surviving piece...)

You miss the beauty of chess here.  It's not winning the game, it's HOW
you do it.  It ceases to be AI if it's just going for points.  There are
brilliant strategies that take 20 moves to accomplish, those 20 moves may
not be the "optimal" point wise, but they win the game faster than the
point wise moves.

> > agendas and options.  You need to give them some room to work around the
> > rules they play by.  If they always do what you expect, the game isn't
> > fun, you always win or you always lose.
>
> You'd of course have a random-factor in the choice of move-tree... Sorry I
> forgot this part in my explanation of the algorithm... (Though I agree
> it would be boring to always win/lose...)

I'm not talking about a random-factor that every once in awhile does
something different for the hell of it!  I'm talking about a deliberate,
calculated action that is in the character's game plan that may or not be
in his best interest.  We all try something stupid when we play,
sometimes it pays off bigtime, sometimes we look really stupid.

> > The various "players" may or may not try to maximize their score all of
> > the time.  They may choose to kick your wimpy butt out of their area of
> > influence because you annoy them rather than do a move into africa that
> > will give them more points.  My AI's would taunt you at that point =)
>
> This is a part of the 'character' argument, and it's good. The min-max would
> always go for the points, if doesn't see a chance at something bigger comming
> up later... But the valuation function could take fewer players as a good
> sign...
>
> This is how I would try to put in some strategy, because this way you can make
> "soft" priorities: Even though you're an annoy little shit, the juicy deal in
> Africa is just to good to let slip. Besides, you have nowhere to go, so we'll
> step on your bug ass next turn...

Pretty much.  Teach the computer player how to play, then what you do when
you play and tell it how you choose your move based on whatever info is
required, then let it play.  As you play against it, you adjust the "how
you choose" part until it plays better than you, then get other people to
play against it and get feedback.

> > Another example.  In StarTrek: Judgment Rites, when you were in
> > space combat against the Klingons,  their basic strategy was to turn their
> > ships toward you and shoot at you no matter where you were.  Their AI was
> > simple "kill the target. Stay out of their sites, cloak if possible."
> >
> > They were pretty easy to destroy: get one in your sites and do whatever it
> > did and keep firing.  If you faced 2 or three of them, as long as you kept
> > one in your sights and fired, the others would have to keep turning and
> > moving to try and hit you.  If you kept moving, they couldn't target you
> > easily and you could blow up the ships one by one if you were good.
>
> Example to prove what?
> (All I see is the results of a too simplistic view on AI)

Turn and shoot is the "optimal" way to win, but not the best way.
Your method is go for the points, you kill by pointing at the target and
shooting, not by flying into formation in your enemy's sights for awhile,
taking hits then sacrificing 1/3 of your attack force to give the others a
possible better shot at the target.

> > In StarFleet Academy, the Kilngon AI is slightly different. When you face
> > multiple klingons, they have multple attack strategies that they use when
> > necessary.  They form up together moving away from you, when you pursue,
> > one or more breaks formation and peels off away, around, behind your ship
> > then blasts the bejeebers out of you, then they  regroup and depending on
> > your damage\ability to fight, they do something else.  They like to
> > disable you then gang up on you for the kill.  They also learn your
> > tactics as you face them in combat and can anticipate your moves.  As you
> > play they get harder to defeat because they KNOW you better.
>
> Like this isn't voodoo...! "Learn". Yeah, sure boss, we'll put that in before
> lunch...

It ain't voodoo.  It's keeping track of what you are doing, what you do
often, and choosing another route based on that info.  It's the same
stuff.  If I play 10 games against you and in every game you go for africa
with reckless abandon and leave other things helpless, I will try and
capitalize on that weakness in your strategy.  It's just tables.  It's
just telling the computer player something, and what to do with that
something he knows.

If I know that as soon as one ship breaks formation you follow it most of
the time I will look to see if you do it this time and have the other
ships do something different in response.  In practice it's more like one
ship tells the others that it's being followed and the others try and
sneak up from behind.  If I know a particular strategy isn't effective
against you, I'll try something different. Go to plan B.

> > One way is hard and repetitive once you get the hang of it, the other is
> > manical and constantly challenging.
>
> The max-min would prolly keep its playing style, but controlling depth and
> random-factor it would probably still be tricky to beat...

I'm sure it would be, but is it "smart?"  Would it be like playing against
a real person?

> (Oh yeah: And be careful with equal signs around here...)
why?

Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria

new topic     » goto parent     » topic index » view message » categorize

13. Re: Computer version of Risk

Micheal wrote this:
> Aders wrote this:
> > (Oh yeah: And be careful with equal signs around here...)
> why?

Problely becuase of the mail server screwing up mime, don't use it on
the mail server, you don't cause it all looks nice, but some do and
then those weird side effects happen, mime sucks, don't use it on the
mail server. Attachments also will be screwed up!!

Best alternative: UUencoding, supported by Pegasusus Mail,
Communicator Mail, Internet Mail (with the MSIE 3+ package) and many
others, search the option list to set it on......

(Noticed Robert did it do, his mails now look nice... :))

About the AI...

        With all the information you both have given me i conclude this:
        (I might be wrong)
        (This is very general, i do not know Risk)

         Write down what his options are (in chess that is every legal move)
         All options have an equal chance at the beginning.
        Try to figure out what the player will do... ('learning')
        Then have a list of influences (one maybe mood, or experience)
        Let the influenses be influences by the next 'move' of the player.
        Set new chances for each possiblity effected by the influence list..
        Randomize with those chances...

        This is the AI i think you're talking about in a practical way.
        If not please explain futher....

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view message » categorize

14. Re: Computer version of Risk

FIRST OF ALL:
I feel pretty stupid arguing with a pro, but since it's turning out to be
really interesting...

> It kept track of every move of every piece then analyzed the board after
> each move.  It would ask each piece what it now could do or not, then

Ok. I think the comment is a bit odd... "Ask each piece"? Is this any
different from listing of all possible moves? Is the "valuation" for these=

moves "deep" or shallow (no tree)?

> prioritize each possibility then advise the player of his options now.

Sift though the tree for highlights. Ok.

> The player could view every move for every piece and it would tell the
> advantages and disadvantages of every move.  Tactically, how did the

Whoa. Hold it. Now we've got a hardcoded tactics expert scoping out the tr=
ee.
Is it a new-and-improved valuation function? It observes regions, position=
s,
complementing/canceling "threat bubbles", trades, and maybe some other
contructs too? Oh, yeah, It's real adaptive too? It sees all kinds kinky s=
tuff?

(Am I looking in the right direction?)

> players situation change as a result of that move?

Same evaluation for resulting board. Ok.

> You miss the beauty of chess here.  It's not winning the game, it's HOW

(How?! Wow, I'll have to meditate on that one. I can relate to the beauty-=
thing,
 but I can't connect it to chess...)

> you do it.  It ceases to be AI if it's just going for points.  There are

Yes. It will fail a Turing-test. (Unlike IBMs code/machine)

> brilliant strategies that take 20 moves to accomplish, those 20 moves ma=
y
> not be the "optimal" point wise, but they win the game faster than the
> point wise moves.

The freaky part about max-min, is that it *will* choose the niftier strate=
gy,
*if it sees it*, that is, searches deep enough. Is your emphasis on playin=
g
like the humans (suckers!) or giving a hard fight? I don't a lot about che=
ss,
but I figure there's got to be about as many brilliant strategies as there=
 are
players right? (In addition to which, they too, count a mind-warping numbe=
r of
moves ahead...) How do you make the computer use one of them? Some kind of=

hardcoding? When do you abandon a master-plan like that?

As for playing like a human, well, I have a real problem with believing th=
at
any chess-player is really human... ?smile

> I'm not talking about a random-factor that every once in awhile does
> something different for the hell of it!  I'm talking about a deliberate,
> calculated action that is in the character's game plan that may or not b=
e
> in his best interest.  We all try something stupid when we play,
> sometimes it pays off bigtime, sometimes we look really stupid.

Hmm, yeah. I wrote the original post because I felt that what you were
describing (in terms of algorithm) was total free-hand spaghetti. It's oka=
y to
make spaghetti, but you should know what you're doing, otherwise it will b=
e
*just* that, and nothing more... My point is to first write a shake-and-ba=
ke
by-the-book algorithm, and try to get it bent later... (If at all)

> Pretty much.  Teach the computer player how to play, then what you do wh=
en
> you play and tell it how you choose your move based on whatever info is
> required, then let it play.  As you play against it, you adjust the "how
> you choose" part until it plays better than you, then get other people t=
o
> play against it and get feedback.

By maximizing score, I mean the kind awarded by the AI-valuation, not the =
game
rules, and they may be very different... (So our views on the resulting mo=
ves
aren't all that different. It's your attitude on the code I really have a =
beef
with...) If the computer beats me, and gives me some attitude doing it, it=
's
Ok. But giving me attitude and getting stepped on is *really* *losing*.

> > Example to prove what?
> > (All I see is the results of a too simplistic view on AI)
>
> Turn and shoot is the "optimal" way to win, but not the best way.
> Your method is go for the points, you kill by pointing at the target and
> shooting, not by flying into formation in your enemy's sights for awhile=
,
> taking hits then sacrificing 1/3 of your attack force to give the others=
 a
> possible better shot at the target.

You're assuming that the AI is /very/ short sighted! This is not neccesari=
ly
so. max-min will happily sacrifice anything, if it sees the gain. (this is=
 the
hard part though)

> > Like this isn't voodoo...! "Learn". Yeah, sure boss, we'll put that in=
 before
> > lunch...
>
> It ain't voodoo.  It's keeping track of what you are doing, what you do

(If you've know how it works, it is never voodoo, that's, like, the
definition...)

> often, and choosing another route based on that info.  It's the same
> stuff.  If I play 10 games against you and in every game you go for afri=
ca
> with reckless abandon and leave other things helpless, I will try and
> capitalize on that weakness in your strategy.  It's just tables.  It's
> just telling the computer player something, and what to do with that
> something he knows.

Yeah. And what do you watch for? How subtile does it get? Going for africa=

every time is a bit big... ?

> If I know that as soon as one ship breaks formation you follow it most o=
f
> the time I will look to see if you do it this time and have the other
> ships do something different in response.  In practice it's more like on=
e
> ship tells the others that it's being followed and the others try and
> sneak up from behind.  If I know a particular strategy isn't effective
> against you, I'll try something different. Go to plan B.

And keep a hardwired set of plans/strategies. Doesn't sound very bright to=

me... If it is really intelligent, it surprises it's creator. And that wou=
ld
IMHO definately requires some voodoo...

> > The max-min would prolly keep its playing style, but controlling depth=
 and
> > random-factor it would probably still be tricky to beat...
>
> I'm sure it would be, but is it "smart?"  Would it be like playing again=
st
> a real person?

Do we want to play against a human we *know* we can beat? Seriously, I hav=
e a
hard time accepting human traits as "smart". The sharper the players, the =
less
quirks, preconceptions, superstitions, habits, whatever... I would think t=
hat
at a lower difficulty, the AI should have more "personality", and less hig=
her
up...

> > (Oh yeah: And be careful with equal signs around here...)
> why?
Some mailer or some server somwhere is puking out "=3D3D"... Pretty #&$=A4=
% random!
So equal signs get filtered out by eyeballs when reading...

> Michael Packard
Anders

-------------------------------------------------------------------
Anders Eurenius <c96aes at cs.umu.se> ICQ UIN:1453793
Computer Science/Engineering student at the university of Umeaa
-------------------------------------------------------------------

new topic     » goto parent     » topic index » view message » categorize

15. Re: Computer version of Risk

> > > (Oh yeah: And be careful with equal signs around here...)
> > why?
> Some mailer or some server somwhere is puking out "=3D3D"... Pretty #&$=A4= %

I wrote that as "=3D", or equals-three-D...

> random! So equal signs get filtered out by eyeballs when reading...
>

(I read about MIME just a minute ago) Arrgh!!! I hope the MIME option *stays*
off!

I hope you can read it! If not tell me, I always keep a copy...

> > Michael Packard
> Anders
Anders

-------------------------------------------------------------------
Anders Eurenius <c96aes at cs.umu.se> ICQ UIN:1453793
Computer Science/Engineering student at the university of Umeaa
-------------------------------------------------------------------

new topic     » goto parent     » topic index » view message » categorize

16. Re: Computer version of Risk

On Wed, 2 Jul 1997 01:45:43 -0700 Michael Packard <lgp at EXO.COM> writes:
        Cocerning computer version of RISK: Risk was liscenced as a
cd-rom game by Hasbro internatrional. Available for Win95 with modem
cpabilities. A AD&D game, or possibly a free form Whitewolf game would be
cool. Could +1 also tell me how the hell video mem pages and mem pages in
general work, the docs suck when in comes to that.


                                Thanx a lot,
                                      Lupine Mcleam

Ps, do any of ya'll have any adresses for other mail server? <ya'll + you
all, I'm from Texas. "Adonde son chikas bonitas, Y dias calores">

new topic     » goto parent     » topic index » view message » categorize

17. Re: Computer version of Risk

On Tue, 8 Jul 1997, Faerun McLeam wrote:
>
> On Wed, 2 Jul 1997 01:45:43 -0700 Michael Packard <lgp at EXO.COM> writes:
>         Cocerning computer version of RISK: Risk was liscenced as a
> cd-rom game by Hasbro internatrional. Available for Win95 with modem
> cpabilities. A AD&D game, or possibly a free form Whitewolf game would be
> cool.

It looks pretty cool. It has combat anims and sound fx.  AI for AD&D
type games is fun.  I worked on the AI for StoneKeep and Bard's Tale III
and Bard's Tale Construction Set (among many other games) I've done a LOT
of monster scripting.

> Could +1 also tell me how the hell video mem pages and mem pages in
> general work, the docs suck when in comes to that.

Unless you're in text modes or 16 color 640x480 mode you get 1 count 'em 1
page.  There are ways around the limitations using mem_copy etc. Quite a
few people around here are working on various graphics solutions.

Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria

new topic     » goto parent     » topic index » view message » categorize

18. Re: Computer version of Risk

> Ps, do any of ya'll have any adresses for other mail server? <ya'll + you
> all, I'm from Texas. "Adonde son chikas bonitas, Y dias calores">

Your Spanish is horrible! ;)
Maybe you meant something like "Adonde hay chicas bonitas? Hace
calor hoy", wich means "Were are the gorgeous girls. It's hot today(talking
about the weather)".

Regards,
  Daniel Berstein
  danielberstein at usa.net
  http://www.geocities.com/SiliconValley/Heights/9316

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu