Newsgroups: comp.lang.fortran
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!maverick.ksu.ksu.edu!mac
From: mac@cis.ksu.edu (Myron A. Calhoun)
Subject: Re: Looking for FORTRAN code for games
Message-ID: <1991Jun12.022221.12473@maverick.ksu.ksu.edu>
Keywords: source, FORTRAN, games
Sender: news@maverick.ksu.ksu.edu (The News Guru)
Nntp-Posting-Host: harris.cis.ksu.edu
Organization: Kansas State University
References: <1991Jun11.215100.27732@sarah.albany.edu>
Distribution: usa
Date: Wed, 12 Jun 91 02:22:21 GMT
Lines: 30

In <1991Jun11.215100.27732@sarah.albany.edu> ss9557@leah.albany.edu (STRACK STEFAN) writes:
>I'm posting this request for a friend of mine, who is looking for
>some diversion while debugging his way through pages of FORTRAN
>code written by someone else :-(

>Does anyone know of some *fun* FORTRAN code that's available ....

While teaching in Africa several years ago I implemented HEXAPAWN,
a (very) simplified version of CHESS (uses a 3x3 board and pawns
only!) which demonstrates a very rudimentary form of A.I. (Artful
Ignorance) in that, when the game(s) begin, the program knows ONLY
the rules for legal moves (and won't let you make illegal moves)
and makes all of its moves using random numbers.  However, each
time it loses (i.e., each time the human wins) the program "remembers"
the (losing) move it last made and never makes that move again!  Thus,
after about 13 games or so, the program wins EVERY game (except for
one little bug).

The program is pure FORTRAN but assumes ANSI screen-control sequences
are available (but that assumption is quite localized in the program).

If there is not much demand I could email it if anyone wants it, or
I could put it in our local anonymous-ftp site for a few weeks, or....
--Myron.
--
# Myron A. Calhoun, Ph.D. E.E.; Associate Professor   (913) 539-4448 home
#  INTERNET:  mac@cis.ksu.edu (129.130.10.2)                532-6350 work
#      UUCP:  ...rutgers!ksuvax1!harry!mac                  532-7353 fax
# AT&T Mail:  attmail!ksuvax1!mac                   W0PBV @ K0VAY.KS.USA.NA
