home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / xplatfrm / tierra / soup_in.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-26  |  4.8 KB  |  101 lines

  1. /* soup_in.h  28-10-91  Artificial Life simulator setup routines */
  2. /** Tierra Simulator V3.0: Copyright (c) 1991 Thomas S. Ray **/
  3.  
  4. #include "license.h"
  5.  
  6. /*
  7. #ifndef lint
  8. static char     sccsid[] = "@(#)soup_in.h    1.4 10/8/91";
  9. #endif
  10. */
  11.  
  12. #ifndef SOUP_IN_H
  13. #define SOUP_IN_H
  14.  
  15. I32s  alive = 100; /* how many millions of instruction will we run */
  16. I32s  BrkupSiz = 5120; /* size of output file in K: break.1, break.2 ... */
  17. I32s  CellsSize = 300; /* initial size of cells array of structures */
  18. I32s  debug = 0; /* 0 = off, 1 = on, printf statements for debugging */
  19. I32s  DiskOut = 1; /* output data to disk (1 = on, 0 = off) */
  20. float  DistFreq = 1; /* frequency of disturbance, factor of recovery time */
  21. float  DistProp = .2; /* proportion of population affected by distrubance */
  22. I32s  DivSameSiz = 0; /* produce offspring of same size, stop size change */
  23. I32s  DivSameGen = 0; /* produce offspring of same genotype, stop evolution */
  24. I32s  DropDead = 5; /* stop system if no reproduction in the last x million */
  25. I32s  GeneBnker = 1; /* turn genebanker on and off */
  26. I8s   GenebankPath[80] = "geneban1/"; /* path for genebanker output */
  27. float GenPerBkgMut = 24.; /* mut rate control by generations ("cosmic ray") */
  28. float GenPerFlaw = 48.; /* flaw control by generations */
  29. float GenPerMovMut = 12.;/* mutation rate control by generations (copy mut) */
  30. I32s  hangup = 1; /* 0 = exit on error, 1 = hangup on error for debugging */
  31. I32s  MaxFreeBlocks = 500; /* initial # of structure for memory allocation */
  32. float MaxMalMult = 3; /* multiple of cell size allowed for mal() */
  33. I32s  MinCellSize = 8; /* minimum size for cells */
  34. I32s  MinTemplSize = 3; /* minimum size for templates */
  35. float  MovPropThrDiv = .7; /* min proportion of daughter cell filled by mov */
  36. I32s  new_soup = 1; /* 1 = this a new soup, 0 = restarting an old run */
  37. I32s  NumCells = 1; /* # of creatures and gaps used to inoculate new soup */
  38. I8s   OutPath[80] = "tiedat/"; /*  path for data output */
  39. double  PhotonPow = 1.5; /* power for photon match slice size */
  40. I32s  PhotonWidth = 8; /* amount by which photons slide to find best fit */
  41. I8s   PhotonWord[80] = "chlorophill"; /*  word used to define photon */
  42. I32s  RamBankSiz = 30000; /* max num genotypes in ram, use with genebanker */
  43. I32s  SaveFreq = 100; /* frequency of saving core_out, soup_out and list */
  44. float SavThrMem = .015; /* threshold memory occupancy to save genotype */
  45. float SavThrPop = .015; /* threshold population proportion to save genotype */
  46. Ind   SearchLimit = 5; /* */
  47. I32s  seed = 0;/* seed for random number generator, 0 uses time to set seed */
  48. I32s  SizDepSlice = 1; /* set slice size by size of creature */
  49. double  SlicePow = 1; /* set power for slice size, use when SizDepSlice = 1 */
  50. I32s  SliceSize = 25; /* slice size when SizDepSlice = 0 */
  51. I32s  SliceStyle = 2; /* choose style of determining slice size */
  52. float  SlicFixFrac = 0; /* fixed fraction of slice size */
  53. float  SlicRanFrac = 2; /* random fraction of slice size */
  54. Ind   SoupSize = 40000; /* size of soup in instructions */
  55. I32s  WatchExe = 0; /* mark executed instructions in genome in genebank */
  56. I32s  WatchMov = 0; /* set mov bits in genome in genebank */
  57. I32s  WatchTem = 0; /* set template bits in genome in genebank */
  58.  
  59. /* an edited version of the id[INSTNUM] array must be created and placed in
  60.    the arginst.h file, for use by the assembler/disassembler of arg.c */
  61.  
  62. #if INST == 1
  63.  
  64. struct InstDef  id[INSTNUM] =
  65.     {{ 0x00, "nop_0",   nop,    pnop },
  66.      { 0x01, "nop_1",   nop,    pnop },
  67.      { 0x02, "or1",     or1,    por1 },
  68.      { 0x03, "shl",     shl,    pshl },
  69.      { 0x04, "zero",    movdd,  pzero },
  70.      { 0x05, "if_cz",   if_cz,  pif_cz },
  71.      { 0x06, "sub_ab",  math,   psub_ab },
  72.      { 0x07, "sub_ac",  math,   psub_ac },
  73.      { 0x08, "inc_a",   math,   pinc_a },
  74.      { 0x09, "inc_b",   math,   pinc_b },
  75.      { 0x0a, "dec_c",   math,   pdec_c },
  76.      { 0x0b, "inc_c",   math,   pinc_c },
  77.      { 0x0c, "push_ax", push,   ppush_ax },
  78.      { 0x0d, "push_bx", push,   ppush_bx },
  79.      { 0x0e, "push_cx", push,   ppush_cx },
  80.      { 0x0f, "push_dx", push,   ppush_dx },
  81.      { 0x10, "pop_ax",  pop,    ppop_ax },
  82.      { 0x11, "pop_bx",  pop,    ppop_bx },
  83.      { 0x12, "pop_cx",  pop,    ppop_cx },
  84.      { 0x13, "pop_dx",  pop,    ppop_dx },
  85.      { 0x14, "jmp",     adr,    ptjmp },
  86.      { 0x15, "jmpb",    adr,    ptjmpb },
  87.      { 0x16, "call",    tcall,  ptcall },
  88.      { 0x17, "ret",     pop,    pret },
  89.      { 0x18, "mov_cd",  movdd,  pmov_dc },
  90.      { 0x19, "mov_ab",  movdd,  pmov_ba },
  91.      { 0x1a, "mov_iab", movii,  pmov_iab },
  92.      { 0x1b, "adr",     adr,    padr },
  93.      { 0x1c, "adrb",    adr,    padrb },
  94.      { 0x1d, "adrf",    adr,    padrf },
  95.      { 0x1e, "mal",     malchm, pmal },
  96.      { 0x1f, "divide",  divide, pdivide }};
  97.  
  98. #endif /* INST == 1 */
  99.  
  100. #endif
  101.