AminetAminet
Search:
84799 packages online
About
Recent
Browse
Search
Upload
Setup
Services

game/misc/capturecontest.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:A programmer's game
Author:Tom Breeden
Uploader:"Tom Breeden" <tmb virginia edu>
Type:game/misc
Version:0.1
Architecture:ppc-amigaos
Date:2011-05-12
Distribution:Aminet
Download:game/misc/capturecontest.lha - View contents
Readme:game/misc/capturecontest.readme
Downloads:752

Capture Programming Challenge for Amiga                         May 3, 2011

Last year I came upon a programming challenge/contest, run by the
ACM Queue magazine, that seemed like it might be fun.

From their description:

   Beginning January 11th, 2010, ACM Queue is offering an online programming competition
   based on the 2009 ACM International Collegiate Programming Competition (ICPC)
   Challenge problem.
   
   The Game of Capture is played on a [2D] field playing field 
   populated with many pucks. Each player controlls three playing pieces, a sled
   and two bumpers, The point is to use your sled to a draw closed loop around groups
   of pucks in an effort to convert as many as you can to your own color.
   The player with the most pucks at the end of a 90-second match is the winner. 

There are no mice, joy-sticks, or keystrokes involved, the two opposing players are
entirely controlled by opposing user-written programs sending control commands to their
moving "sleds" and "bumpers" via the game engine. The game engine in turn supplies
each player to the entire game state - sleds, bumpers, and the 112 movable pucks.

Unfortunately, Amiga programmers were almost locked out of the game, since

   "Participants will get to code a player in C++, C#, or Java
   and compete with others in a game called Capture."

Even if you worked in C++, you could not do any testing on the Amiga since the game engine
was a Java program.

Now I've generated an independent implementation of the game engine to run on AOS 4.1, to
see if I could do it, and to see if we could have some fun programming.

I think it is ready to have a go. The engine does the physics and graphics, so programming
your own player is not beyond a beginning or a rusty programmer, but programming a really
good player is a challenge for the best programmer.

The players and the engine are separate processes, communicating via Amiga pipes, so
it is open to anyone's favorite Amiga language, C, C++, E, Modula-2, etc.

Since I used my Aglet Modula-2 compiler to do the engine and also am supplying
sources for some simple example players in Modula-2, I'm hoping to spark some interest
in my favorite language.

I've also included however, as proof of concept, a working C source version of the RandomPlayer
in my doubtful C.

By now, a year has passed and the Queue 2011 contest was a different game. However,
as of now all their material for the 2010 game is still on-line. Their write-up of
the rules of the game and the format of the information that passes between the players
and the the game engine are well written and detailed.

See especially these URLs:

   http://queue.acm.org/icpc/game_description/main.cfm
   http://queue.acm.org/icpc/game_description/overview.cfm
   http://queue.acm.org/icpc/game_description/rules.cfm
   http://queue.acm.org/icpc/game_description/environment.cfm

The game runs pretty satisfactorily with the few example player programs I've written.
All testing has been done on a A1 and a Sam-Flex 440, both with Radeon 9250. 

Deviations from the Queue Descriptions
    The turn time runs at 100 msec as in the Queue description, but my implementation is
    a bit more relaxed about the timing. In the Queue version, if a player does not respond
    within 100 msec of the start of the turn, it simply continued the game without his move.
    The Amiga version will wait a bit for a late response, but will simply end the game immediately
    if it streches on to 250 msec.
    
    Instead of using standard input and output for communicating with the players, the Amiga version
    uses separately named pipes, which works well and seemed to be necessary for performance.
    
Players supplied:
    StaticPlayer            does no moving, keeps out of the way to make it easier to see what your player is doing.
    RandomPlayer            moves his sled and bumpers randomly, but can get in your way.
    RancomPlayer_C          as noted 
    RandomChasePlayer       moves his sled randomly, sends his bumpers manically after yours to no purpose.
    HerdPlayer              the only player I've written who makes real effort to use his sled and bumpers to effect.

    Note: even HerdPlayer has a few seconds of random moving at the start, in order to avoid exact game duplicates
          when playing this small number of opponents.
    
Executables
    <the above players>
    Capture                 
    CapturePlayback         a run of Capture can produce a trace file of the game, after which CapturePlayback will
                            simply display what happened. 
Traces
    test.trace              a trace of a sample game between RandomPlayer and HerdPlayer
    trace-Final.txt         a trace of the Queue contest's final match for the championship

Sources
    <the above players Modula-2 sources>
    C sources for my attempt to duplicate M2 RandomPlayer
    PlayerLib M2 module
    Capture game controller program
        
Tom Breeden
tmb@virginia.edu



Contents of game/misc/capturecontest.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[unknown]                 9186    9186 100.0% -lh0- 1923 May  1 09:22 CaptureContest/058.gif
[unknown]                 9008   10578  85.2% -lh5- 651c May  8 21:28 CaptureContest/058.gif.info
[unknown]                 9573   11420  83.8% -lh5- 90fb May  8 21:28 CaptureContest/C.info
[unknown]                  978    2677  36.5% -lh5- bb6f Jan 18 20:20 CaptureContest/C/CaptureSpecs.h
[unknown]                 3130    5092  61.5% -lh5- a8a5 May  8 21:17 CaptureContest/C/CaptureSpecs.h.info
[unknown]                 2990   11536  25.9% -lh5- 1fba Jan 18 20:19 CaptureContest/C/ICPCPlayerLib.c
[unknown]                 3128    5092  61.4% -lh5- 05f9 May  8 21:17 CaptureContest/C/ICPCPlayerLib.c.info
[unknown]                  945    2581  36.6% -lh5- d988 Jan 18 20:20 CaptureContest/C/ICPCPlayerLib.h
[unknown]                 3128    5092  61.4% -lh5- a7b1 May  8 21:17 CaptureContest/C/ICPCPlayerLib.h.info
[unknown]                  151     315  47.9% -lh5- 00fc Jan  9 17:18 CaptureContest/C/MyTypes.h
[unknown]                 3131    5092  61.5% -lh5- 80af May  8 21:17 CaptureContest/C/MyTypes.h.info
[unknown]                 3112   11141  27.9% -lh5- d5c6 Jan 18 20:20 CaptureContest/C/PipeIO.c
[unknown]                 3128    5092  61.4% -lh5- 197f May  8 21:17 CaptureContest/C/PipeIO.c.info
[unknown]                  889    2132  41.7% -lh5- 1100 Jan 18 20:20 CaptureContest/C/PipeIO.h
[unknown]                 3129    5092  61.4% -lh5- 5165 May  8 21:17 CaptureContest/C/PipeIO.h.info
[unknown]                 2857    9395  30.4% -lh5- 11e6 Jan 18 20:17 CaptureContest/C/RandomPlayer.c
[unknown]                 3128    5092  61.4% -lh5- d2ae May  8 21:17 CaptureContest/C/RandomPlayer.c.info
[unknown]               193898  619304  31.3% -lh5- ab50 Feb 13 19:10 CaptureContest/Capture
[unknown]                 7277    8904  81.7% -lh5- 41ea May  8 21:28 CaptureContest/Capture.info
[unknown]                 1880    5611  33.5% -lh5- 945a Jan 30 20:32 CaptureContest/Capture.prj
[unknown]                 1771    2015  87.9% -lh5- ac7a May  8 21:28 CaptureContest/Capture.prj.info
[unknown]               149257  482943  30.9% -lh5- a1b0 Apr 30 15:38 CaptureContest/CapturePlayback
[unknown]                 7270    8890  81.8% -lh5- a66f May  8 21:28 CaptureContest/CapturePlayback.info
[unknown]                 1783    5431  32.8% -lh5- 8e8e Jan 20 20:59 CaptureContest/CapturePlayback.prj
[unknown]                 1785    2027  88.1% -lh5- f7ec May  8 21:28 CaptureContest/CapturePlayback.prj.info
[unknown]                 9574   11420  83.8% -lh5- d96b May  8 21:28 CaptureContest/Def.info
[unknown]                  169     296  57.1% -lh5- 15a1 May 29  2010 CaptureContest/Def/CaptureComm.DEF
[unknown]                 3953    6412  61.7% -lh5- 81fd May  8 21:17 CaptureContest/Def/CaptureComm.DEF.info
[unknown]                  311     908  34.3% -lh5- d4ac Dec 16 19:53 CaptureContest/Def/CaptureDebug.DEF
[unknown]                 3951    6412  61.6% -lh5- 3c10 May  8 21:17 CaptureContest/Def/CaptureDebug.DEF.info
[unknown]                  812    2860  28.4% -lh5- a8bd Feb  1 20:16 CaptureContest/Def/CaptureDefs.DEF
[unknown]                 3954    6412  61.7% -lh5- debc May  8 21:17 CaptureContest/Def/CaptureDefs.DEF.info
[unknown]                  496    1215  40.8% -lh5- f7a7 Feb  1 20:11 CaptureContest/Def/CaptureEngine.DEF
[unknown]                 3952    6412  61.6% -lh5- 1928 May  8 21:17 CaptureContest/Def/CaptureEngine.DEF.info
[unknown]                  359     942  38.1% -lh5- 6261 Dec  5 17:30 CaptureContest/Def/CaptureGraphics.DEF
[unknown]                 3951    6412  61.6% -lh5- 0438 May  8 21:17 CaptureContest/Def/CaptureGraphics.DEF.info
[unknown]                  649    2124  30.6% -lh5- 93fe Dec 21 20:32 CaptureContest/Def/CapturePlayerIO.DEF
[unknown]                 3953    6412  61.7% -lh5- 8daf May  8 21:17 CaptureContest/Def/CapturePlayerIO.DEF.info
[unknown]                 1208    3382  35.7% -lh5- 25fd Jan 29 15:28 CaptureContest/Def/CaptureSpecs.DEF
[unknown]                 3953    6412  61.7% -lh5- 555d May  8 21:17 CaptureContest/Def/CaptureSpecs.DEF.info
[unknown]                 1015    2825  35.9% -lh5- df85 Jan 29 15:29 CaptureContest/Def/PlayerLib.DEF
[unknown]                 3953    6412  61.7% -lh5- 51eb May  8 21:17 CaptureContest/Def/PlayerLib.DEF.info
[unknown]                  588    1352  43.5% -lh5- e0b7 Jan 22 15:18 CaptureContest/Def/TraceFileIO.DEF
[unknown]                 3952    6412  61.6% -lh5- 2dce May  8 21:17 CaptureContest/Def/TraceFileIO.DEF.info
[unknown]               129068  399865  32.3% -lh5- 868a Feb 13 19:11 CaptureContest/HerdPlayer
[unknown]                 7266    8890  81.7% -lh5- bf87 May  8 21:28 CaptureContest/HerdPlayer.info
[unknown]                 1747    5324  32.8% -lh5- 2efe Dec 26 10:27 CaptureContest/HerdPlayer.prj
[unknown]                 1773    2015  88.0% -lh5- 1010 May  8 21:28 CaptureContest/HerdPlayer.prj.info
[unknown]                 9577   11420  83.9% -lh5- c61e May  8 21:28 CaptureContest/Mod.info
[unknown]                 4790   17715  27.0% -lh5- 8825 Feb  9 21:11 CaptureContest/Mod/Capture.MOD
[unknown]                 3951    6412  61.6% -lh5- c42d May  8 21:18 CaptureContest/Mod/Capture.MOD.info
[unknown]                  103     183  56.3% -lh5- cb3f May 29  2010 CaptureContest/Mod/CaptureComm.MOD
[unknown]                 3952    6412  61.6% -lh5- 4fbc May  8 21:18 CaptureContest/Mod/CaptureComm.MOD.info
[unknown]                 1197    5869  20.4% -lh5- 47e2 Jan 28 20:16 CaptureContest/Mod/CaptureDebug.MOD
[unknown]                 3955    6412  61.7% -lh5- 3645 May  8 21:18 CaptureContest/Mod/CaptureDebug.MOD.info
[unknown]                  289     753  38.4% -lh5- a072 Dec 19 12:15 CaptureContest/Mod/CaptureDefs.MOD
[unknown]                 3954    6412  61.7% -lh5- a7b5 May  8 21:18 CaptureContest/Mod/CaptureDefs.MOD.info
[unknown]                20371   93447  21.8% -lh5- d361 Feb  5 17:40 CaptureContest/Mod/CaptureEngine.MOD
[unknown]                 3953    6412  61.7% -lh5- 5f36 May  8 21:18 CaptureContest/Mod/CaptureEngine.MOD.info
[unknown]                 2358    8437  27.9% -lh5- 1912 Feb  6 20:52 CaptureContest/Mod/CaptureGraphics.MOD
[unknown]                 3955    6412  61.7% -lh5- 859c May  8 21:18 CaptureContest/Mod/CaptureGraphics.MOD.info
[unknown]                 1934    5887  32.9% -lh5- f4b5 Apr 30 15:38 CaptureContest/Mod/CapturePlayback.MOD
[unknown]                 3952    6412  61.6% -lh5- 73bf May  8 21:18 CaptureContest/Mod/CapturePlayback.MOD.info
[unknown]                 5115   22875  22.4% -lh5- 47ef Feb  9 21:17 CaptureContest/Mod/CapturePlayerIO.MOD
[unknown]                 3952    6412  61.6% -lh5- 3faf May  8 21:18 CaptureContest/Mod/CapturePlayerIO.MOD.info
[unknown]                  224     464  48.3% -lh5- 249f Jan 24 20:10 CaptureContest/Mod/CaptureSpecs.MOD
[unknown]                 3952    6412  61.6% -lh5- 095f May  8 21:18 CaptureContest/Mod/CaptureSpecs.MOD.info
[unknown]                 7319   30950  23.6% -lh5- 528a Feb  4 21:35 CaptureContest/Mod/HerdPlayer.MOD
[unknown]                 3956    6412  61.7% -lh5- 0da1 May  8 21:18 CaptureContest/Mod/HerdPlayer.MOD.info
[unknown]                 2530   10134  25.0% -lh5- 345d Jan 29 15:30 CaptureContest/Mod/PlayerLib.MOD
[unknown]                 3955    6412  61.7% -lh5- 5b48 May  8 21:18 CaptureContest/Mod/PlayerLib.MOD.info
[unknown]                 3000    9813  30.6% -lh5- c552 Feb  4 21:40 CaptureContest/Mod/RandomChasePlayer.MOD
[unknown]                 3954    6412  61.7% -lh5- 40e2 May  8 21:18 CaptureContest/Mod/RandomChasePlayer.MOD.info
[unknown]                 2711    8434  32.1% -lh5- 6943 Feb  4 21:36 CaptureContest/Mod/RandomPlayer.MOD
[unknown]                 3953    6412  61.7% -lh5- 05ed May  8 21:18 CaptureContest/Mod/RandomPlayer.MOD.info
[unknown]                 2006    6040  33.2% -lh5- 149c Feb  4 21:36 CaptureContest/Mod/StaticPlayer.MOD
[unknown]                 3954    6412  61.7% -lh5- e0f9 May  8 21:18 CaptureContest/Mod/StaticPlayer.MOD.info
[unknown]                 4239   17504  24.2% -lh5- e921 Feb  7 21:04 CaptureContest/Mod/TraceFileIO.MOD
[unknown]                 3954    6412  61.7% -lh5- 7d08 May  8 21:18 CaptureContest/Mod/TraceFileIO.MOD.info
[unknown]               123675  398376  31.0% -lh5- 4b63 Feb 13 19:32 CaptureContest/RandomChasePlayer
[unknown]                 7266    8890  81.7% -lh5- 7dfe May  8 21:28 CaptureContest/RandomChasePlayer.info
[unknown]                 1676    4941  33.9% -lh5- 78fc Dec 24 20:58 CaptureContest/RandomChasePlayer.prj
[unknown]                 1773    2015  88.0% -lh5- c7cc May  8 21:28 CaptureContest/RandomChasePlayer.prj.info
[unknown]               122318  418221  29.2% -lh5- ac2b Feb 20 20:59 CaptureContest/RandomPlayer
[unknown]                 7267    8890  81.7% -lh5- 93b7 May  8 21:28 CaptureContest/RandomPlayer.info
[unknown]                 1806    5554  32.5% -lh5- 6619 Jan 17 15:35 CaptureContest/RandomPlayer.prj
[unknown]                 1773    2015  88.0% -lh5- c106 May  8 21:28 CaptureContest/RandomPlayer.prj.info
[unknown]                10059   79047  12.7% -lh5- 309b Jan 17 20:31 CaptureContest/RandomPlayer_C
[unknown]                 7265    8890  81.7% -lh5- 9eed May  8 21:28 CaptureContest/RandomPlayer_C.info
[unknown]                 2229    5007  44.5% -lh5- fe3f May  4 19:45 CaptureContest/ReadMe.txt
[unknown]                 3131    5092  61.5% -lh5- 9f72 May  8 21:28 CaptureContest/ReadMe.txt.info
[unknown]               124687  397757  31.3% -lh5- cb91 Feb 13 19:32 CaptureContest/StaticPlayer
[unknown]                 7266    8890  81.7% -lh5- f7b9 May  8 21:28 CaptureContest/StaticPlayer.info
[unknown]                 1675    4936  33.9% -lh5- 0131 Jan 17 19:13 CaptureContest/StaticPlayer.prj
[unknown]                 1773    2015  88.0% -lh5- 13bd May  8 21:28 CaptureContest/StaticPlayer.prj.info
[unknown]                 9577   11420  83.9% -lh5- 0b7c May  8 21:28 CaptureContest/Traces.info
[unknown]               227038 5609968   4.0% -lh5- 71ec Apr 30 20:46 CaptureContest/Traces/test.trace
[unknown]                 3129    5092  61.4% -lh5- c83e May  8 21:17 CaptureContest/Traces/test.trace.info
[unknown]               488328 6566302   7.4% -lh5- 3384 Feb  9  2010 CaptureContest/Traces/trace-Final.txt
[unknown]                 3129    5092  61.4% -lh5- 8778 May  8 21:17 CaptureContest/Traces/trace-Final.txt.info
[unknown]                 4949   13714  36.1% -lh5- 4491 May  9 20:30 CaptureContest/CaptureContest.guide
[unknown]                10642   16014  66.5% -lh5- b04e May  9 20:06 CaptureContest/CaptureContest.guide.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total       102 files 1916615 15677099  12.2%            May 11 19:49
Page generated in 0.03 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>