procgen  Check-in [d425e8a7c7]

Overview
Comment:updates
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d425e8a7c7bd5645dd4427dd4a9c07415ac86f037b99568aab4f57a53fde07f1
User & Date: lexi on 2019-06-24 09:24:06
Other Links: manifest | tags
Context
2019-07-27
06:29
add structure macro check-in: e856b9f3a8 user: lexi tags: trunk
2019-06-24
09:24
updates check-in: d425e8a7c7 user: lexi tags: trunk
2019-06-11
22:01
add dotorg check-in: a250db5fda user: lexi tags: trunk
Changes

Modified pharma.ml from [f8230bde94] to [764d55bf37].

1
2
3
4
5
6
7
8
9
10
let suffixes = [| "tine"; "zone"; "done"; "dol"; "mycin"; "pentin"; "nine"; "cillin"; "mab"; "xone"; "xine"; "zine"; "dine"; "nyl"; "nil"; "codone"; "morphone"; "drene"; "phine"; "thine"; "toxin"; "xin"; "dioxin"; "lene"; "ne"; "pine"; "relin"; "gen"; "phen"; "fen"; "dem"; "lone"; "fen"; "line"; "but"; "te"; "xate"; "tal"; "mate"; "norphine"; "dal"; "phetamine"; "amphetamine"; "quel"; |]
let salts = [| "chloride"; "acetate"; "phosphate"; "hydrochloride"; "succinate"; "sulphate"; |]
let prefixes = [| "neo"; "retro"; "nor"; "tri"; "cycli"; "tetra"; "penta"; "methyl"; "nal"; "pro"; "metha"; "fenta"; "meta"; "hydro"; "fluoro"; "thieno"; "mal"; "eroto"; "diablo"; "miso"; "propy"; "ethy"; "buta"; "hexa"; "benzo"; "piperi"; "sado"; "maso"; "philo"; "theo"; "iso"; "cyclo"; "klepto"; "pyro"; "carba"; "ibu"; "masculo"; "phos"; "estro"; "endo"; "poly"; "bi"; "tri"; "cumulo"; "strato"; "dextro"; "sinistro"; "levo"; "dextra"; "sinistra"; "ecto"; "myco"; "canna"; "am"; |]
let onsets = [| "f"; "fl"; "fr"; "p"; "pr"; "pl"; "c"; "cr"; "cl"; "s"; "sc"; "scl"; "scr"; "ph"; "sph"; "phr"; "phl"; "ch"; "chr"; "chl"; "z"; "th"; "thr"; "r"; "x"; |]
let vowels = [| "a"; "e"; "i"; "o"; "u"; "y"; |]
let codas = [| "n"; "m"; "r"; "s"; "f"; |]
let pick a = a.(Random.int(Array.length a))
let range min max = min+(Random.int(max-min))

let syl () = match range 0 3 with
|

|







1
2
3
4
5
6
7
8
9
10
let suffixes = [| "tine"; "zone"; "done"; "dol"; "mycin"; "pentin"; "nine"; "cillin"; "mab"; "xone"; "xine"; "zine"; "dine"; "nyl"; "nil"; "codone"; "morphone"; "drene"; "phine"; "thine"; "toxin"; "xin"; "dioxin"; "lene"; "ne"; "pine"; "relin"; "gen"; "phen"; "fen"; "dem"; "lone"; "fen"; "line"; "but"; "te"; "xate"; "tal"; "mate"; "norphine"; "dal"; "phetamine"; "amphetamine"; "quel"; "fol";  |]
let salts = [| "chloride"; "acetate"; "phosphate"; "hydrochloride"; "succinate"; "sulphate"; |]
let prefixes = [| "neo"; "retro"; "nor"; "tri"; "cycli"; "tetra"; "penta"; "methyl"; "nal"; "pro"; "metha"; "fenta"; "meta"; "hydro"; "fluoro"; "thieno"; "mal"; "eroto"; "diablo"; "miso"; "propy"; "ethy"; "buta"; "hexa"; "benzo"; "piperi"; "sado"; "maso"; "philo"; "theo"; "iso"; "cyclo"; "klepto"; "pyro"; "carba"; "ibu"; "masculo"; "phos"; "estro"; "endo"; "poly"; "bi"; "tri"; "cumulo"; "strato"; "dextro"; "sinistro"; "levo"; "dextra"; "sinistra"; "ecto"; "myco"; "canna"; "am"; "di"; "diclo"; "triclo"; "nazi"; "commu"; "communo"; |]
let onsets = [| "f"; "fl"; "fr"; "p"; "pr"; "pl"; "c"; "cr"; "cl"; "s"; "sc"; "scl"; "scr"; "ph"; "sph"; "phr"; "phl"; "ch"; "chr"; "chl"; "z"; "th"; "thr"; "r"; "x"; |]
let vowels = [| "a"; "e"; "i"; "o"; "u"; "y"; |]
let codas = [| "n"; "m"; "r"; "s"; "f"; |]
let pick a = a.(Random.int(Array.length a))
let range min max = min+(Random.int(max-min))

let syl () = match range 0 3 with

Modified threat.scm from [c3beb2da63] to [e796932c22].


1
2
3
4
5


6

7
8
9
10

11
12
13
14
15





































16
17
18
19
20
21
22
23
24
25
26
27
28




29
30
31









32
33
34

35
36
37




38
39
40
41
42

(include "bot.scm")

(define actors
  '#(me you thou they him her myself "your mother" "your mom" "your father"
	"your dad" "your aunt" "your uncle" "your dog"))




(define pronouns '(
  (you    (nom . "you")  (acc . "you")  (gen . "your")  (poss . "yours")  )
  (thou   (nom . "thou") (acc . "thee") (gen . "thy")   (poss . "thine")  )
  (they   (nom . "they") (acc . "them") (gen . "their") (poss . "theirs") )

  (him    (nom . "he")   (acc . "him")  (gen . "his")   (poss . "his")    )
  (her    (nom . "her")  (acc . "her")  (gen . "hers")  (poss . "hers")   )
  (me	  (nom . "I")    (acc . "me")   (gen . "my")    (poss . "mine")   )
  (myself (nom . "I") 	 (acc . "myself") (gen . "my own") (poss . "my own"))))






































(define (conjugate v t n)
  (if (eq? v 'cop)
	(case (cons t n)
	

(define (inflect c n)
  (if (string? n)
	(case c
	  ((nom acc)  n)
	  ((gen poss cop) (string-append n "'s")))
	; else
	(cdr (assq c (cdr (assq n pronouns))))))





(rule (action victim)
  ("port " victim " to lisp")
  ("rain on " victim "'s parade"))










(rule (subject actor)
  ((inflect 'cop actor) " gonna")

  ((inflect 'nom actor) " swear"))
  
(print




  (inflect
	(pick '#(nom acc gen poss))
	(pick actors)))

;(print (action "you")) 
>
|

<
|
|
>
>

>

|
|
|
>
|
<
|
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


|








|

>
>
>
>

<
<
>
>
>
>
>
>
>
>
>



>
|
|
<
>
>
>
>
|
|
|


1
2
3

4
5
6
7
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73


74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
96
97
(include "lib/lisp-macro.scm")
(include "lib/bot.scm")


(rule (maybe x) (x) (""))
(rule (maybe_ x) (x " "))
(rule (maybe* x) ((x)) (""))
(rule (maybe_* x) ((x) " ") (""))

(bank pronoun 'me 'you 'thou 'they 'him 'her 'myself)
(define pronouns '(
  (you    (nom . "you")  (acc . "you")  (gen . "your")  (poss . "yours")  (cop . "you're"))
  (thou   (nom . "thou") (acc . "thee") (gen . "thy")   (poss . "thine")  (cop . "thou art"))
  (they   (nom . "they") (acc . "them") (gen . "their") (poss . "theirs") (cop . "they're"))
  (her    (nom . "her")  (acc . "her")  (gen . "her")   (poss . "hers")   (cop . "she's"))
  (him    (nom . "he")   (acc . "him")  (gen . "his")   (poss . "his")    (cop . "he's"))

  (me	  (nom . "I")    (acc . "me")   (gen . "my")    (poss . "mine")   (cop . "I'm"))
  (myself (nom . "I") 	 (acc . "myself") (gen . "my own") (poss . "my own") (cop . "I'm"))))

(define (thy x) (string-append (inflect 'gen (pronoun)) " " x))

(bank article 'def 'indef 'dem-prox 'dem-dist)
(define (decline art nm n)
  ; art = (def indef dem-prox dem-dist)
  (let* ([sg (if (pair? (cdr n)) (cadr n) (cdr n))]
		 [pl (if (pair? (cdr n)) (cddr n) (string-append sg "s"))]
		 [vwl (car n)]
		 [sel (if (eq? nm 'sg) sg pl)])
	(apply string-append (case art
	  ((def)  (list "the " sel))
	  ((indef) (case nm
				 ((sg) (case vwl
						 ((a) (list "a " sel))
						 ((an) (list "an " sel))))
				 ((pl) (list sel))))
	  ((dem-prox) (case nm
					((sg) (list "this " sel))
					((pl) (list "these " sel))))
	  ((dem-dist) (case nm
					((sg) (list "that " sel))
					((pl) (list "those " sel))))))))

(bank relatives
	  "mother" "mom" "father" "dad" "aunt" "uncle" "dog" "friend" "granny"
	  "grandma" "grandfather" "grandpa" "grandmother")
(bank jobs
	  '(a . "banker")   '(a ."porn star") '(a . "general") '(a . "president") 
	  '(a . "janitor") '(an ."executive") '(a . ("sheep" . "sheep")) '(a . ("spy" . "spies"))
	  '(a . "fed") '(a . "war criminal"))

(rule (actors)
	  ((pronoun))
	  ((thy (relatives)))
	  ((decline (article) (one-of 'sg 'pl) (jobs)))
	  ((inflect 'gen (pronoun)) " " (relatives)))

(define (conjugate v t n)
  (if (eq? v 'cop)
	(case (cons t n) )))
	

(define (inflect c n)
  (if (string? n)
	(case c
	  ((nom acc)  n)
	  ((gen poss cop) (string-append n "'s")))
	; else
	  (cdr (assq c (cdr (assq n pronouns))))))

(bank organ
	  "balls" "gut" "face" "head" "nose" "brain" "heart"
	  "ass" "tits" "duodenum" "kidneys" "pooper")

(rule (action victim)


  ("port " (inflect 'acc victim) " to lisp")
  ("rain on " (inflect 'gen victim) " parade")
  ((one-of "shoot" "stab") " " (inflect 'acc victim) " in the " (organ))
  ("impale " (inflect 'acc victim)
   (@ ("") (" on " (one-of "the flagpole" "a spike" "the terrorspike"))))
  ("demolish " (inflect 'gen victim) " house")
  ("have " (inflect 'acc victim) " " (one-of "sent" "deported") " "
   (maybe "straight ") "to "
   (one-of "Siberia" "the north pole" "Betelgeuse" "the moon" "Cleveland")))

(rule (subject actor)
  ((inflect 'cop actor) " gonna")
  ((inflect 'cop actor) " " (one-of "fixing" "plotting" "planning" "scheming") " to"))
  ; ((inflect 'nom actor) " swear to"))


(rule (clause actor victim)
	  ((subject actor) " " (action victim)))
  
(print (clause (actors) (actors)))
  ; ((inflect
	; (pick '#(nom acc gen poss))
	; (pick actors)))

;(print (action "you"))