procgen  Diff

Differences From Artifact [a935c1d4c7]:

To Artifact [ec18cd79e9]:


    12     12   
    13     13   let range min max = (Random.int (max-min)) + min
    14     14   let chance n = range 0 n = 0
    15     15   let pick (r: 'a array) : 'a = r.(range 0 (Array.length r));;
    16     16   
    17     17   module CrimeDrug = struct
    18     18   
    19         -let frics = [| "f"; "sh"; "th"; |]
    20         -let vfrics = [| "z"; "v"; "zh"; |]
    21         -let stops = [| "t"; "p"; "k"; "c"; |]
    22         -let vstops = [| "d"; "b"; "g"; "gh"; |]
    23         -let withglide r f = Array.map (fun i -> i^f) r
    24         -let withonset r o = Array.map (fun i -> o^i) r
    25         -let consonants = Array.concat [
    26         -	frics; vfrics; stops; vstops;
    27         -	withonset stops "s";
    28         -	[| "w"; "r"; "rh"; "s"; "l"; "ch"; "n"; "m"; |];
    29         -]
    30         -let initials = Array.concat [
    31         -	consonants;
    32         -	withglide frics "r"; withglide frics "l"; withglide frics "w";
    33         -	withglide stops "r"; withglide vstops "r"; withglide vstops "w";
    34         -	[| "qu"; "spr"; "spl"; "str"; "scr"; "scl"; "squ"; "bl"; "gl"; "sn"; "sm"; "j"; "h"; "sph"; "ph";|];
    35         -]
    36         -let nuclei = [| "e"; "ee"; "i"; "a"; "ou"; "u"; "oo"; "ea"; "oa"; "ai"; "oi"; "ie";|]
    37         -let finals = Array.concat [
    38         -	vstops;
    39         -	withonset stops "s"; withonset stops "r"; withonset stops "l";
    40         -	withonset vstops "r"; withonset vstops "l";
    41         -	[| "gh"; "ck"; "ce"; "ss"; "se"; "nd"; "mb"; "mph"; "nk"; "tch"; "ke"; "ght";
    42         -	"ff";  "ll"; "zz"; "t"; "p"; "th"; "rth"; "lth"; "dge"; "nge"; "ng"; "ft"; "ckle"; "ngle"; "rkle";
    43         -	"scht"; "ze"; "x"; "sh"; "rsh"; "lsh"; "ggle"; "ddle"; "bble"; "pple"; "rge"; "lge"; "ve"; "rve";
    44         -	"lve"; "ffle"; "ttle"; "kle"; "sch"; "m"; "n"; "rm"; "lm"; "rn"; "ln";|]
    45         -]
    46         -let prefixes = [| A "crack"; A "crystal"; A "powdered"; A"raw"; A "pure"; A "liquid";
    47         -	A"street"; A "super"; An "electric"; A "diced"; A "homemade"; A "traditional";
    48         -	An "old-school"; A "purified"; A "high-caliber"; A "high-octane"; An "old-fashioned";
    49         -	A "good old"; A "honest-to-god"; A "weapons-grade"; A "soviet"; An "american";
    50         -	A "canadian"; A "british"; A "russian"; A "synthetic"; A "french"; A "cyber"; |]
           19  +    let frics = [| "f"; "sh"; "th"; |]
           20  +    let vfrics = [| "z"; "v"; "zh"; |]
           21  +    let stops = [| "t"; "p"; "k"; "c"; |]
           22  +    let vstops = [| "d"; "b"; "g"; "gh"; |]
           23  +    let withglide r f = Array.map (fun i -> i^f) r
           24  +    let withonset r o = Array.map (fun i -> o^i) r
           25  +    let consonants = Array.concat [
           26  +        frics; vfrics; stops; vstops;
           27  +        withonset stops "s";
           28  +        [| "w"; "r"; "rh"; "s"; "l"; "ch"; "n"; "m"; |];
           29  +    ]
           30  +    let initials = Array.concat [
           31  +        consonants;
           32  +        withglide frics "r"; withglide frics "l"; withglide frics "w";
           33  +        withglide stops "r"; withglide vstops "r"; withglide vstops "w";
           34  +        [| "qu"; "spr"; "spl"; "str"; "scr"; "scl"; "squ"; "bl"; "gl"; "sn"; "sm"; "j"; "h"; "sph"; "ph";|];
           35  +    ]
           36  +    let nuclei = [| "e"; "ee"; "i"; "a"; "ou"; "u"; "oo"; "ea"; "oa"; "ai"; "oi"; "ie";|]
           37  +    let finals = Array.concat [
           38  +        vstops;
           39  +        withonset stops "s"; withonset stops "r"; withonset stops "l";
           40  +        withonset vstops "r"; withonset vstops "l";
           41  +        [| "gh"; "ck"; "ce"; "ss"; "se"; "nd"; "mb"; "mph"; "nk"; "tch"; "ke"; "ght";
           42  +        "ff";  "ll"; "zz"; "t"; "p"; "th"; "rth"; "lth"; "dge"; "nge"; "ng"; "ft"; "ckle"; "ngle"; "rkle";
           43  +        "scht"; "ze"; "x"; "sh"; "rsh"; "lsh"; "ggle"; "ddle"; "bble"; "pple"; "rge"; "lge"; "ve"; "rve";
           44  +        "lve"; "ffle"; "ttle"; "kle"; "sch"; "m"; "n"; "rm"; "lm"; "rn"; "ln";|]
           45  +    ]
           46  +    let prefixes = [| A "crack"; A "crystal"; A "powdered"; A"raw"; A "pure"; A "liquid";
           47  +        A"street"; A "super"; An "electric"; A "diced"; A "homemade"; A "traditional";
           48  +        An "old-school"; A "purified"; A "high-caliber"; A "high-octane"; An "old-fashioned";
           49  +        A "good old"; A "honest-to-god"; A "weapons-grade"; A "soviet"; An "american";
           50  +        A "canadian"; A "british"; A "russian"; A "synthetic"; A "french"; A "cyber"; |]
    51     51   
    52         -let makeA i x = A(i ^ x)
    53         -let makeAn x = An x
    54         -let maybeConcat x y = match x with
    55         -	| Some t -> wconcat t y
    56         -	| None -> y
    57         -let gen () : word = maybeConcat (if chance 3 then Some (pick prefixes) else None)
    58         -	((if chance 5 then makeAn else makeA (pick initials))
    59         -		((pick nuclei) ^ (pick finals)))
    60         -		
           52  +    let makeA i x = A(i ^ x)
           53  +    let makeAn x = An x
           54  +    let maybeConcat x y = match x with
           55  +        | Some t -> wconcat t y
           56  +        | None -> y
           57  +    let gen () : word = maybeConcat (if chance 3 then Some (pick prefixes) else None)
           58  +        ((if chance 5 then makeAn else makeA (pick initials))
           59  +            ((pick nuclei) ^ (pick finals)))
           60  +            
    61     61   end
    62     62   
    63     63   let rec crime = R [|
    64     64   	Tv "arson";
    65     65   	T "murder";
    66     66   	T "jaywalking";
    67     67   	T "larceny";
................................................................................
   135    135   	T "war profiteering";
   136    136   	T "blackmail";
   137    137   	T "cybercrime";
   138    138   	T "espionage";
   139    139   	T "hijacking";
   140    140   	T "hooliganism";
   141    141   	T "perjury";
          142  +    T "snakes";
          143  +    T "perpetuation of a ruckus";
          144  +    T "perpetuation of a nuisance";
          145  +    T "perpetuation of a public nuisance";
   142    146   	T "refusal to serve in a public office";
   143    147   	B [ T  "failure to appear before"; Indef; profession ];
   144    148   	B [ T  "refusal to serve as"; Indef; profession ];
   145    149   	B [ T  "stalking"; O(T"of"); Indef; profession ];
   146    150   	B [ T  "solicitation of"; Indef; profession ];
   147    151   	B [ T "bribery of"; Indef; profession; ];
   148    152   	B [ T "cruelty to"; Indef; profession; ];
................................................................................
   190    194   	B [ T "receiving stolen"; thingp ];
   191    195   	B [ T "deploying"; Indef; thing ];
   192    196   	T "being horny";
   193    197   	T "marketing";
   194    198   	T "advertising";
   195    199   	T "unlawful restraint";
   196    200   	T "trespassing";
          201  +    T "creating a nuisance";
          202  +    T "creating a public nuisance";
          203  +    T "causing a ruckus";
   197    204   |] and doing = R [|
   198    205   	Tv "entering";
   199    206   	T "decorating";
   200    207   	Tv "invoking";
   201    208   	Tv "evoking";
   202    209   	Tv "insulting";
   203    210   	Tv "advertising";
   204         -	Tv "mentoring";
   205         -	Tv "bantering";
   206         -	Tv "yiffing";
   207         -	Tv "posting";
   208         -	Tv "tweeting";
   209         -	Tv "blogging";
          211  +	T "mentoring";
          212  +	T "bantering";
          213  +	T "yiffing";
          214  +	T "posting";
          215  +	T "tweeting";
          216  +	T "blogging";
          217  +    T "hollering";
          218  +    T "yelling";
          219  +    T "bartering";
          220  +    T "matriculating";
          221  +    T "berating";
          222  +    T "bothering";
          223  +    T "irritating"; 
          224  +    T "copulating";
          225  +    T "titillating"; 
          226  +    T "aggravating";
   210    227   |] and practice = R [|
   211    228   	T "falconry";
   212    229   	T "dentistry";
   213    230   	T "philosophy";
   214    231   	T "linguistics";
   215    232   	T "conjuration";
   216         -	T "illusion";
          233  +	Tv "illusion";
   217    234   	T "mathematics";
   218    235   	T "set theory";
   219    236   	T "math";
   220    237   	T "physics";
   221         -	T "astrophysics";
          238  +	Tv "astrophysics";
   222    239   	T "natural philosophy";
   223    240   	T "chemistry";
   224    241   	T "engineering";
   225    242   	T "marketing";
   226    243   	T "advertising";
   227    244   	T "blogging";
   228    245   	T "tweeting";
................................................................................
   231    248   |] and instrument = R [|
   232    249   	T "clarinet";
   233    250   	T "piano";
   234    251   	Tv "oboe";
   235    252   	T "flute";
   236    253   	T "violin";
   237    254   |] and thing = R [|
   238         -	T "clarinet";
   239         -	T "piano";
   240         -	T "deadly weapon";
   241         -	T "firearm";
   242         -	T "weapon";
   243         -	T "sex doll";
   244         -	T "rhinocerous";
   245         -	T "farm animal";
   246         -	T "landmine";
   247         -	T "rocket launcher";
   248         -	T "rocket-propelled grenade";
   249         -	T "grenade";
   250         -	T "ballistic missile";
   251         -	T "ICBM";
   252         -	T "rifle";
   253         -	T "vibrator";
          255  +	T  "clarinet";
          256  +	T  "piano";
          257  +	T  "deadly weapon";
          258  +	T  "dread weapon";
          259  +	T  "firearm";
          260  +	T  "weapon";
          261  +	T  "sex doll";
          262  +	T  "rhinocerous";
          263  +	T  "farm animal";
          264  +	T  "landmine";
          265  +	T  "rocket launcher";
          266  +	T  "rocket-propelled grenade";
          267  +	T  "grenade";
          268  +	T  "ballistic missile";
          269  +	T  "ICBM";
          270  +	T  "rifle";
          271  +	T  "vibrator";
   254    272   	Tv "assault rifle";
   255    273   	Tv "assault weapon";
   256    274   	Tv "automatic weapon";
   257    275   	Tv "artifact";
          276  +	Tv "dread artifact";
          277  +	Tv "cursed artifact";
   258    278   	Tv "orb";
   259         -	T "cursed object";
          279  +	T  "cursed object";
   260    280   	Tv "infectious disease";
   261         -	T "nuclear weapon";
   262         -	T "bioweapon";
   263         -	T "chemical weapon";
   264         -	T "memetic hazard";
   265         -	T "metaphor";
   266         -	T "simile";
          281  +	T  "nuclear weapon";
          282  +	T  "bioweapon";
          283  +	T  "chemical weapon";
          284  +	T  "memetic hazard";
          285  +	T  "metaphor";
          286  +	T  "simile";
   267    287   	Tv "analogy";
   268         -	T "turkey baster";
   269         -	T "rolling pin";
   270         -	T "household item";
          288  +	T  "turkey baster";
          289  +	T  "rolling pin";
          290  +	T  "household item";
   271    291   	Tv "appliance";
   272         -	T "blog";
   273         -	T "post";
   274         -	T "tweet";
          292  +	T  "blog";
          293  +	T  "post";
          294  +	T  "tweet";
          295  +    T  "snake";
   275    296   |] and thingp = R [|
   276    297   	T "clarinets";
   277    298   	T "pianos";
   278    299   	T "deadly weapons";
          300  +	T "dread weapons";
   279    301   	T "firearms";
   280    302   	T "weapons";
   281    303   	T "sex dolls";
   282    304   	T "rhinoceri";
   283    305   	T "farm animals";
   284    306   	T "landmines";
   285    307   	T "rocket launchers";
................................................................................
   290    312   	T "rifles";
   291    313   	T "vibrator";
   292    314   	T "handcuffs";
   293    315   	Tv "assault rifles";
   294    316   	Tv "assault weapons";
   295    317   	Tv "automatic weapons";
   296    318   	Tv "artifacts";
          319  +	Tv "dread artifacts";
          320  +	Tv "cursed artifacts";
   297    321   	Tv "orbs";
   298    322   	T "hazardous materials";
   299    323   	T "gender";
   300    324   	T "cursed objects";
   301    325   	Tv "infectious diseases";
   302    326   	Tv "internet access";
   303    327   	T "nuclear material";
................................................................................
   314    338   	T "rolling pins";
   315    339   	T "household items";
   316    340   	Tv "appliances";
   317    341   	T "stolen property";
   318    342   	T "blogs";
   319    343   	T "posts";
   320    344   	T "tweets";
          345  +    T "snakes";
   321    346   |] and profession = R [|
   322    347   	T "public official";
   323    348   	Tv "officer of the law";
   324    349   	T "justice of the peace";
   325    350   	T "locksmith";
   326    351   	T "blacksmith";
   327    352   	T "silversmith";
................................................................................
   373    398   	T "second-degree";
   374    399   	T "third-degree";
   375    400   	T "culpable and reckless";
   376    401   	T "criminal";
   377    402   	T "illegal";
   378    403   	T "forcible";
   379    404   	T "fractal";
          405  +	T "obnoxious";
   380    406   |] and suffix = R [|
   381    407   	B [ T "with intent to commit"; crime ];
   382    408   	T "in a public place";
   383    409   	T "in a court of law";
   384    410   	T "on public transit";
   385    411   	T "on the high seas";
   386    412   	Tv "in anger";
................................................................................
   497    523   			O(T "hereby");
   498    524   			R[|T "sentence"; T "condemn"|];
   499    525   			R[| T "you"; T "the defendant"; T "the accused party";|];
   500    526   		];
   501    527   	|];
   502    528   	T "to";
   503    529   ]
          530  +let determiner = [| T "your"; T "your own"; T "the"; |]
          531  +let sdet = R (Array.concat [ determiner; [| T "a"; T "this"; T "that"; |] ])
          532  +let pdet = R (Array.concat [ determiner; [| T "these"; T "those"; |] ])
   504    533   let condemnation = B[
   505    534   	sentence;
   506    535   	R[|
   507         -		B[
   508         -			T "die";
          536  +		B[  T "die";
   509    537   			O(T "screaming");
   510    538   			O(T "in agony");
   511    539   			O(B[
   512    540   				T "by";
   513    541   					O(T "prolonged");
   514    542   					O(T "ritual");
   515    543   					O(T "public");
   516    544   					R[| T "beheading"; T "strangulation"; T "torture";
   517    545   						T "industrial negligence"; T "slow slicing"; T "lethal injection";
   518         -						T "disembowelment"; T "drowning"; T "burning";
          546  +                        T "disembowelment"; T "drowning"; T "drowning at sea"; T "burning";
   519    547   						T "burning at the stake"; T "emasculation"; T "irradiation";
   520    548   						T "stabbing"; T "poisoning"; T "flaying"; T "roasting";
   521    549   						T "boiling"; T "boiling in oil"; T "boiling in acid";
   522    550   						T "crucifixion"; |]
   523    551   			]);
   524    552   		];
   525    553   		T "hang";
   526    554   		T "hang until dead";
   527    555   		T "hang until you are dead";
   528    556   		T "be drawn and quartered";
   529    557   		T "drown";
          558  +		T "drown at sea";
   530    559   		T "burn";
   531    560   		T "burn at the stake";
   532    561   		T "be burned";
   533    562   		T "be burned at the stake";
   534    563   		T "be broken on the wheel";
   535    564   		T "be torn apart by wild horses";
          565  +        T "snakes";
          566  +        B[  R[|
          567  +                T "forfeit";
          568  +                T "be deprived of";
          569  +                T "be given";
          570  +                T "be subjected to";
          571  +            |];
          572  +            R[|
          573  +                B[ O(pdet); thingp; ];
          574  +                B[ sdet; thing; ];
          575  +            |]
          576  +        ]
   536    577   	|];
   537    578   	O(R[|
   538    579   		B[
   539    580   			T "at";
   540    581   			R[|
   541    582   				T "dawn"; T "dusk"; T "noon"; T "high noon"; T "sunrise"; T "sunset";
   542    583   			|]
................................................................................
   544    585   		T "within one week";
   545    586   		T "within the hour";
   546    587   		T "by day's end";
   547    588   	|])
   548    589   ]
   549    590   let imprisonment = B[
   550    591   	sentence;
          592  +    O( T "spend" );
   551    593   	R[|
   552    594   		B[
   553    595   			R[|T "two"; T "three"; T "four"; T "five"; T "six"; T "seven";
   554    596   			Tv "eight"; T "nine"; T "ten";|];
   555    597   			R[|T "seconds"; T "minutes"; T "days"; T "weeks";  T "years"; T "decades"; T "millennia";
   556    598   				T "hundred years"; T "thousand years"; Tv "eons"; Tv "ages"; Tv "eras"; T "million years";
   557    599   				T "billion years"; T "trillion years"; |];
................................................................................
   667    709   			|];
   668    710   		];
   669    711   	|];
   670    712   	T "to"; 
   671    713   	R[|
   672    714   		B[T "perform"; R[|T "one"; numbers;|]; T "hundred jumping jacks"];
   673    715   		T "make amends";
   674         -		T "beg forgiveness";
          716  +		T "beg for forgiveness";
   675    717   		T "do the right thing";
   676    718   		T "bleed";
   677    719   		T "sacrifice your firstborn";
   678    720   		T "forever quit the land of your birth";
   679    721   		B[
   680    722   			T "pay a fine of";
   681    723   			numbers; (* TODO better numbers *)
................................................................................
   746    788   			T "Heaven and all its angels"; T "our Creator"; T "the Maker"; T "the spirits";
   747    789   		|];
   748    790   		P ",";
   749    791   	]);
   750    792   	R[|
   751    793   		B[court;
   752    794   			O(T "hereby");
   753         -			R[| T "finds"; T "declares"; T "proclaims"; T "pronounces"; T "judges"; Tv "adjuges";|];
          795  +			R[| T "finds"; T "declares"; T "proclaims"; T "pronounces"; T "judges"; Tv "adjudges";|];
   754    796   		];
   755    797   		B[Tv "I";
   756    798   			O(T "hereby");
   757    799   			R[| T "find"; T "declare"; T "proclaim"; T "pronounce"; T "judge"; Tv "adjudge"|];
   758    800   		]
   759    801   	|];
   760    802   	R[| T "you"; T "the defendant"; T "the accused party";|];