[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference auss::algorithms

Title:ALGORITHMS
Notice:Welcome to ALGORITHMS
Moderator:AUSS::BELL
Created:Fri Jan 27 1995
Last Modified:Tue Jun 03 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:253
Total number of notes:1741

253.0. "Computer Opponents" by JHAXP::DECARTERET (Live mice sit on us) Fri Mar 28 1997 06:58

    I'm working on a computer version of the card game Cribbage.  I'm
    wondering if anyone knows of any philosophy behind creating a computer
    opponent that you can either describe or point me to.
    
    Jason
T.RTitleUserPersonal
Name
DateLines
253.1do it a little at a timeCPEEDY::BRADLEYChuck BradleyFri Apr 11 1997 12:2348
in any multiplayer game, make a framework that controls the game,
such things as shuffling, dealing, setting up the starting position,
detecting wins and losses, keeping score, taking turns, recording
the play so you can study it later, etc.

have a plug in module for each player.  it implements that player's
strategy.  the first such module should be one that asks a person
what to do, reads the answer, and does it. using n such modules,
make sure everything else works.

after that works, make your first cut at a program to play the game.
plug it in and see how it does against an opponent that is a person.
figure out why it loses and improve the program.  don't throw out
the old programs.  let them compete against each other.  try many
ideas and see how they work against each other.

check AI books for more detailed suggestions.  Many game playing systems
require a function to compute a relative advantage of a situation.
Chess is mostly done by look ahead, searching a very large configuration
space.  Most paths do not lead to a win, so the path that leads to the
best "position" against the "best" play by the opponent is chosen.
read about alpha-beta pruning.

sometimes the history of play is important, and sometimes not.
for blackjack, what has been played tells you how rich the deck is
and that can affect your betting strategy.

sometimes a simple set of rules will be effective.  it's been about
40 years since i played cribbage, but i remember it as mostly luck.
remembering what had been played was helpful. i'd start with
a simple expert system.  as the program loses you will notice other
rules to add.  about the time you think the game is a hopeless
snarl of special cases, you will notice a generalization and your
program will become much simpler and somewhat stronger.

xcon, the system configurator, went through that cycle several times.

there are several good books about expert systems.
most of the expert systems i have heard about do not have an opponent,
or the opponent is nature.  

cribbage may be simple enough that beginner at AI but with some skill
and tenacity at programming has a chance to make a program that will
be competative.

there are note files for AI and expert systems.  good luck.