[comp.edu] Computer implementation of card games

ling@maccs.dcss.mcmaster.ca (R. Lingarkar) (09/17/89)

	I am looking for books that have algorithms for implementation
of popular card games such as Black Maria, Hearts, etc.  If anyone of you
have come across such books or any other info, please let me know.

				Thanks in advance.

abbott@aerospace.aero.org (Russell J. Abbott) (09/20/89)

In article <2512DF6F.19668@maccs.dcss.mcmaster.ca> ling@maccs.dcss.mcmaster.ca (R. Lingarkar) writes:
>
>	I am looking for books that have algorithms for implementation
>of popular card games such as Black Maria, Hearts, etc.  If anyone of you
>have come across such books or any other info, please let me know.
>
>				Thanks in advance.

Try:	Levy, David N.L., Computer Games, Springer-Verlag, 1988.

It's a comprehensive survey.

-- 
-- Russ abbott@itro3.aero.org

din@grad1.cis.upenn.edu (Clarence Din) (09/23/89)

In article <58134@aerospace.AERO.ORG> abbott@aerospace.aero.org (Russell J. Abbott) writes:
>In article <2512DF6F.19668@maccs.dcss.mcmaster.ca> ling@maccs.dcss.mcmaster.ca (R. Lingarkar) writes:
>>
>>	I am looking for books that have algorithms for implementation
>>of popular card games such as Black Maria, Hearts, etc.  If anyone of you
>>have come across such books or any other info, please let me know.
>
>Try:	Levy, David N.L., Computer Games, Springer-Verlag, 1988.
>
>It's a comprehensive survey.

I agree.  I've read it and it's one of the better ones out there.

-------------------------------------------------------------------------------
| Clarence Kenneth Din       |                         |   ___  __  __ ____   |
|                            |  Descartes' doth say... |  // |/ || //  || \\  |
| University of Pennsylvania |  "I thought,            | ||     ||     ||  || |
| din@grad1.cis.upenn.edu    |   Therefore, I ain't!"  |  \\__  || \\_ |__//  |
-------------------------------------------------------------------------------

kalvala@iris.ucdavis.edu (Sara &) (10/02/89)

I have a rather general question regarding the use of games in
teaching beginning programming and data structures - how useful do
you people find them? I myself much rather have them than the
accounting/management type of examples, but how well do they go with
students? are they taken seriously?

And specifically - which card game would be ideal for introducing data
structures? Have to use one in a couple days and can't decide:
blackjack? rummy? solitaire? ...

						Sara Kalvala
						kalvala@iris.ucdavis.edu
						skalvala@ucdavis.bitnet

khsoh@bruce.OZ (Kam Hung Soh) (10/03/89)

In article <KALVALA.89Oct1232355@iris.ucdavis.edu>, kalvala@iris.ucdavis.edu (Sara &) writes:
> And specifically - which card game would be ideal for introducing data
> structures? Have to use one in a couple days and can't decide:
> blackjack? rummy? solitaire? ...

Blackjack would be the easiest to implement.  The computer player
can be pretty dumb, the user interface rudimentary and it would
teach students how to handle data structures that include records
and arrays - if that is what you are looking for.  You have to be
careful that students don't get caught up trying to come up with
a super computer player or pretty graphics, though.

Solitaire is too hard because plenty of cards have to be
displayed on the screen at all times, and rummy has too many
rules.  

I only speak from experience in trying to implement these games
when I am learning a new language.  


-- 
khsoh@bruce.cs.monash.oz                   

MARWK@levels.sait.edu.au (10/03/89)

In article <KALVALA.89Oct1232355@iris.ucdavis.edu>, kalvala@iris.ucdavis.edu (Sara &) writes:
> I have a rather general question regarding the use of games in
> teaching beginning programming and data structures - how useful do
> you people find them? I myself much rather have them than the
> accounting/management type of examples, but how well do they go with
> students? are they taken seriously?
> 
> And specifically - which card game would be ideal for introducing data
> structures? Have to use one in a couple days and can't decide:
> blackjack? rummy? solitaire? ...
> 
Patience games like russian bank ( a 2-person game) would be particularly
useful because it uses a variety of structures including stacks (since
cards can be placed back onto the stock pile and the talon by one's opponent).

It depends on the degree of complexity you want to achieve but I might give the
above as a 4- or 5-week 4-hours/week practical, but I have not considered all
of the difficulty nor its complexity.  I would probably not give it in the
first semester of a course unless I gave them many hints and a great deal of
discussion.

Ray Kennington

marie@ernie.Berkeley.EDU (Marie desJardins) (10/04/89)

In article <1570@bruce.OZ> khsoh@bruce.OZ (Kam Hung Soh) writes:
>Blackjack would be the easiest to implement.  The computer player
>can be pretty dumb, the user interface rudimentary and it would
>teach students how to handle data structures that include records
>and arrays - if that is what you are looking for.  You have to be
>careful that students don't get caught up trying to come up with
>a super computer player or pretty graphics, though.

I agree that blackjack is a good game to have beginning
programming students write, for the reasons Kam gives.

But I would amend the last sentence to say "you have to
be careful that students don't *think they have to* get
caught up trying to come up with a super computer player
or pretty graphics."  The students who implement the game
correctly and completely should get full credit.  But those
who want to spend time trying to build a clever player 
(e.g. one that figures out its opponent's strategies and 
modifies its play based on that) or nice graphics shouldn't
be discouraged (as long as you have enough computing power
that it isn't slowing down the system for everybody else,
and as long as they implement the core of the program in
an elegant fashion).  Playing around with extensions to
programs can, for many students, be the most useful 
learning experience in an introductory programming class.

Teachers should always encourage creativity in their 
students' work as long as the material being taught is
understood first (or, simultaneously).

Marie desJardins
marie@ernie.berkeley.edu