home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / gam / sharks.doc < prev    next >
Text File  |  2006-10-19  |  3KB  |  62 lines

  1. Club 100 Library - 415/939-1246 BBS
  2. 937-5039 NEWSLETTER, 932-8856 VOICE
  3.  
  4. This program downloads into 2450 bytes and takes 1880 bytes in BASIC.
  5.  
  6. In order to run this program, the user
  7. must supply the following parameters:
  8.  
  9.  1) #cols....width of ocean in columns
  10.  2) #rows....length of ocean
  11.  3) #fish....initial number of fish
  12.  4) #sharks..initial number of sharks
  13.  5) fish breed...fish reproductive age
  14.  6) shark breed...# meals required to
  15.                   breed
  16.  7) starve....# cycles a shark can live
  17.               without eating a fish
  18.  8) #attempts..shark hunting efficiency
  19.  9) feed range...shark feeding range
  20. 10) sound (1=y)..1=sound, 0=silence
  21.     (sound makes it easier to follow
  22.     the action)
  23.  
  24. The fish, which appear as small diamonds on the screen, move about at random,
  25.  eat plankton, and reproduce.  Aside from being shark-bait, that is the
  26. extent of their activity.  Alas, they don't even have enough intelligence to
  27. avoid a hungry shark.  Fortunately for them, however, the user has control of
  28. the sharks' hunting efficiency.  The parameter, "feed range" limits the
  29. distance from which they can make a kill.  For realism (and in the interest
  30. of keeping the sharks lives exciting), 1 or 2 is recommended here.  The other
  31. shark-controling factor, "# attempts", controls the number of times a shark
  32. randomly looks (within the square defined by his "feeding range" limit)
  33.  for a fish.  This can range from 1 up. The use of very large numbers in this
  34.  parameter will slow the program down proportionately, as well as making it a
  35. very hostile environment for the local variety of fish.
  36. The sharks, of which only a fin is visible above the surface, also move
  37. around randomly (one space at a time) - except when they see a fish, of course.
  38.  
  39. The simulation progresses with 2 passes of the ocean per cycle:  a move/feed
  40. cycle and a reproduction/starvation
  41. cycle.  At any time a lowercase "t" can be pressed and released to produce the
  42.  current tallys of fish eaten, sharks starved, and the fixed run parameters. 
  43.  These numbers will not come up until the completion of the current cycle so,
  44.  in the case of large oceans, be patient.  After reading the tally
  45.  screen, just press "enter" and the run will continue.
  46.  
  47. The best sets of parameters that I have
  48. found have given extremely stable runs - one of which went 8 days
  49.  before I cancelled it (to get my computer back!).  Now for the bad
  50.  news... I'm not telling those parameters.
  51.  
  52. I'd be interested to know of any wild
  53.  and crazy, yet stable, parameter sets to arise from anyones experimentation.
  54.  
  55. -Ray Yeargin 
  56.  
  57. P.S.  T200 users:  change the if
  58.  statement in line 11 to read "IFK=39ANDP=15THEND(K,P)=638"
  59. The "15" and "638" changes prevent writing into the last character of the
  60.  screen & therefore scrolling and botching the screen.  If you don't make
  61. this change, you must limit yourself to a "#cols" parameters of 39 and less.
  62.