From 811a28315c4a171feb10b6a8b223d45d75b72727 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 19 Feb 2021 23:42:10 +0000 Subject: [PATCH] Version 0.1.1 --- docs/cloverage/index.html | 125 ++-- .../the_great_game/gossip/gossip.clj.html | 4 +- .../the_great_game/gossip/news_items.clj.html | 538 +++++++++--------- .../the_great_game/merchants/markets.clj.html | 20 +- .../merchants/merchant_utils.clj.html | 12 +- .../merchants/planning.clj.html | 14 +- .../merchants/strategies/simple.clj.html | 24 +- docs/cloverage/the_great_game/time.clj.html | 28 +- docs/cloverage/the_great_game/utils.clj.html | 4 +- .../the_great_game/world/location.clj.html | 2 +- .../the_great_game/world/routes.clj.html | 8 +- .../the_great_game/world/run.clj.html | 2 +- .../the_great_game/world/world.clj.html | 2 +- docs/codox/Baking-the-world.html | 2 +- docs/codox/Game_Play.html | 2 +- ...p_scripted_plot_and_Johnny_Silverhand.html | 2 +- docs/codox/Organic_Quests.html | 2 +- docs/codox/Populating-a-game-world.html | 2 +- docs/codox/Settling-a-game-world.html | 2 +- docs/codox/Simulation-layers.html | 2 +- ...ad-of-knowledge-in-a-large-game-world.html | 2 +- docs/codox/Uncanny_dialogue.html | 2 +- .../Voice-acting-considered-harmful.html | 2 +- docs/codox/economy.html | 2 +- docs/codox/index.html | 2 +- docs/codox/intro.html | 2 +- .../modelling_trading_cost_and_risk.html | 2 +- docs/codox/naming-of-characters.html | 2 +- docs/codox/on-dying.html | 2 +- docs/codox/sandbox.html | 2 +- docs/codox/sexual-dimorphism.html | 2 +- docs/codox/the-great-game.agent.agent.html | 2 +- docs/codox/the-great-game.gossip.gossip.html | 2 +- .../the-great-game.gossip.news-items.html | 2 +- .../the-great-game.merchants.markets.html | 2 +- ...e-great-game.merchants.merchant-utils.html | 2 +- .../the-great-game.merchants.merchants.html | 2 +- .../the-great-game.merchants.planning.html | 2 +- ...reat-game.merchants.strategies.simple.html | 2 +- docs/codox/the-great-game.time.html | 2 +- docs/codox/the-great-game.utils.html | 2 +- docs/codox/the-great-game.world.location.html | 2 +- docs/codox/the-great-game.world.routes.html | 2 +- docs/codox/the-great-game.world.run.html | 2 +- docs/codox/the-great-game.world.world.html | 2 +- project.clj | 2 +- 46 files changed, 434 insertions(+), 415 deletions(-) diff --git a/docs/cloverage/index.html b/docs/cloverage/index.html index 516511b..237af9c 100644 --- a/docs/cloverage/index.html +++ b/docs/cloverage/index.html @@ -14,24 +14,13 @@ Lines % TotalBlankInstrumented - - the-great-game.agent.agent
1
-100.00 % -
1
-100.00 % -721 - the-great-game.gossip.gossip
5
105
-4.55 % + style="width:95.37037037037037%; + float:left;"> 103 +4.63 %
5
the-great-game.gossip.news-items
485
38
-92.73 % + style="width:92.80155642023347%; + float:left;"> 477
37
+92.80 %
91
9
4
-96.15 % -24630104 + style="width:88.07339449541284%; + float:left;"> 96
8
5
+95.41 % +25631109 the-great-game.merchants.markets
206
191
7
-96.71 % +96.46 %
41
the-great-game.merchants.merchant-utils
203
197
104
-66.12 % +65.45 %
48
the-great-game.merchants.planning
264
33
-88.89 % + style="width:89.27335640138408%; + float:left;"> 258
31
+89.27 %
71
the-great-game.merchants.strategies.simple
5
612
-0.81 % + style="width:99.17355371900827%; + float:left;"> 600
+0.83 %
5
the-great-game.time
263
240
1
-99.62 % +99.59 %
59
the-great-game.utils
72
+ float:left;"> 69
100.00 %
the-great-game.world.location
76
73
10
-88.37 % +87.95 %
12
the-great-game.world.routes
127
123
1
-99.22 % +99.19 %
41
the-great-game.world.run
3
58
-4.92 % + style="width:95.0%; + float:left;"> 57
+5.00 %
3
the-great-game.world.world
420
18
-95.89 % + style="width:3.8901601830663615%; + float:left;"> 17
+96.11 %
65
Totals: -66.88 % +66.55 % -68.59 % +68.63 % diff --git a/docs/cloverage/the_great_game/gossip/gossip.clj.html b/docs/cloverage/the_great_game/gossip/gossip.clj.html index 8a83a2d..bf7ed93 100644 --- a/docs/cloverage/the_great_game/gossip/gossip.clj.html +++ b/docs/cloverage/the_great_game/gossip/gossip.clj.html @@ -118,13 +118,13 @@ 038             (remove
- + 039               #( = g %)
040               (filter
- + 041                 #(= (:location %) (:location g))
diff --git a/docs/cloverage/the_great_game/gossip/news_items.clj.html b/docs/cloverage/the_great_game/gossip/news_items.clj.html index 6e5f68b..adf5a7d 100644 --- a/docs/cloverage/the_great_game/gossip/news_items.clj.html +++ b/docs/cloverage/the_great_game/gossip/news_items.clj.html @@ -134,337 +134,337 @@ 043  
- 044    ##### Locations: + 044    By implication, the character values passed should include *all* the +
+ + 045    information the giver knows about the character; that can then be degraded +
+ + 046    as the receiver stores only that segment which the receiver finds +
+ + 047    interesting.
- 045   + 048  
- 046    A 'location' value is a list comprising at most the x/y coordinate location -
- - 047    and the ids of the settlement and region (possibly hierarchically) that contain -
- - 048    the location. If the x/y is not local to the home of the receiving agent, they -
- - 049    won't remember it and won't pass it on; if any of the ids are not interesting -
- - 050    So location information will degrade progressively as the item is passed along. + 049    ##### Locations:
- 051   + 050  
- 052    It is assumed that the `:home` of a character is a location in this sense. + 051    A 'location' value is a list comprising at most the x/y coordinate location +
+ + 052    and the ids of the settlement and region (possibly hierarchically) that contain +
+ + 053    the location. If the x/y is not local to the home of the receiving agent, they +
+ + 054    won't remember it and won't pass it on; if any of the ids are not interesting +
+ + 055    So location information will degrade progressively as the item is passed along.
- 053   + 056  
- 054    ##### Inferences: + 057    It is assumed that the `:home` of a character is a location in this sense.
- 055   + 058  
- 056    If an agent learns that Adam has married Betty, they can infer that Betty has + 059    ##### Inferences: +
+ + 060  
- 057    married Adam; if they learn that Charles killed Dorothy, that Dorothy has died. + 061    If an agent learns that Adam has married Betty, they can infer that Betty has
- 058    I'm not convinced that my representation of inferences here is ideal. + 062    married Adam; if they learn that Charles killed Dorothy, that Dorothy has died.
- 059    " + 063    I'm not convinced that my representation of inferences here is ideal. +
+ + 064    "
- 060    { ;; A significant attack is interesting whether or not it leads to deaths + 065    { ;; A significant attack is interesting whether or not it leads to deaths
- 061      :attack {:verb :attack :keys [:actor :other :location]} + 066      :attack {:verb :attack :keys [:actor :other :location]}
- 062      ;; Deaths of characters may be interesting + 067      ;; Deaths of characters may be interesting
- 063      :die {:verb :attack :keys [:actor :location]} + 068      :die {:verb :die :keys [:actor :location]}
- 064      ;; Deliberate killings are interesting. + 069      ;; Deliberate killings are interesting.
- 065      :kill {:verb :kill :keys [:actor :other :location] + 070      :kill {:verb :kill :keys [:actor :other :location]
- 066             :inferences [{:verb :die :actor :other :other :nil}]} + 071             :inferences [{:verb :die :actor :other :other :nil}]}
- 067      ;; Marriages may be interesting + 072      ;; Marriages may be interesting
- 068      :marry {:verb :marry :keys [:actor :other :location] + 073      :marry {:verb :marry :keys [:actor :other :location]
- 069              :inferences [{:verb :marry :actor :other :other :actor}]} + 074              :inferences [{:verb :marry :actor :other :other :actor}]}
- 070      ;; The end of ongoing open conflict between to characters may be interesting + 075      ;; The end of ongoing open conflict between to characters may be interesting
- 071      :peace {:verb :peace :keys [:actor :other :location] + 076      :peace {:verb :peace :keys [:actor :other :location]
- 072              :inferences [{:verb :peace :actor :other :other :actor}]} + 077              :inferences [{:verb :peace :actor :other :other :actor}]}
- 073      ;; Things related to the plot are interesting, but will require special + 078      ;; Things related to the plot are interesting, but will require special
- 074      ;; handling. Extra keys may be required by particular plot events. + 079      ;; handling. Extra keys may be required by particular plot events.
- 075      :plot {:verb :plot :keys [:actor :other :object :location]} + 080      :plot {:verb :plot :keys [:actor :other :object :location]}
- 076      ;; Rapes are interesting. + 081      ;; Rapes are interesting.
- 077      :rape {:verb :rape :keys [:actor :other :location] + 082      :rape {:verb :rape :keys [:actor :other :location]
- 078             ;; Should you also infer from rape that actor is male and adult? + 083             ;; Should you also infer from rape that actor is male and adult?
- 079             :inferences [{:verb :attack} + 084             :inferences [{:verb :attack}
- 080                          {:verb :sex} + 085                          {:verb :sex}
- 081                          {:verb :sex :actor :other :other :actor}]} + 086                          {:verb :sex :actor :other :other :actor}]}
- 082      ;; Merchants, especially, are interested in prices in other markets + 087      ;; Merchants, especially, are interested in prices in other markets
- 083      :sell {:verb :sell :keys [:actor :other :object :location :price]} + 088      :sell {:verb :sell :keys [:actor :other :object :location :price]}
- 084      ;; Sex can juicy gossip, although not normally if the participants are in an + 089      ;; Sex can juicy gossip, although not normally if the participants are in an
- 085      ;; established sexual relationship. + 090      ;; established sexual relationship.
- 086      :sex {:verb :sex :keys [:actor :other :location] + 091      :sex {:verb :sex :keys [:actor :other :location]
- 087            :inferences [{:verb :sex :actor :other :other :actor}]} + 092            :inferences [{:verb :sex :actor :other :other :actor}]}
- 088      ;; Thefts are interesting + 093      ;; Thefts are interesting
- 089      :steal {:verb :steal :keys [:actor :other :object :location]} + 094      :steal {:verb :steal :keys [:actor :other :object :location]}
- 090      ;; The succession of rulers is interesting; of respected craftsmen, + 095      ;; The succession of rulers is interesting; of respected craftsmen,
- 091      ;; potentially also interesting. + 096      ;; potentially also interesting.
- 092      :succession {:verb :succession :keys [:actor :other :location :rank]} + 097      :succession {:verb :succession :keys [:actor :other :location :rank]}
- 093      ;; The start of ongoing open conflict between to characters may be interesting + 098      ;; The start of ongoing open conflict between to characters may be interesting
- 094      :war {:verb :war :keys [:actor :other :location] + 099      :war {:verb :war :keys [:actor :other :location]
- 095            :inferences [{:verb :war :actor :other :other :actor}]} + 100            :inferences [{:verb :war :actor :other :other :actor}]}
- 096      }) + 101      })
- 097   + 102  
- 098   + 103  
- 099  (defn interest-in-character + 104  (defn interest-in-character
- 100    "Integer representation of how interesting this `character` is to this + 105    "Integer representation of how interesting this `character` is to this
- 101    `gossip`. + 106    `gossip`.
- 102    *TODO:* this assumes that characters are passed as keywords, but, as + 107    *TODO:* this assumes that characters are passed as keywords, but, as
- 103    documented above, they probably have to be maps, to allow for degradation." + 108    documented above, they probably have to be maps, to allow for degradation."
- 104    [gossip character] + 109    [gossip character] +
+ + 110    (count
- 105    (count -
- - 106      (concat + 111      (concat
- 107        (filter #(= (:actor % character)) (:knowledge gossip)) + 112        (filter #(= (:actor % character)) (:knowledge gossip))
- 108        (filter #(= (:other % character)) (:knowledge gossip))))) + 113        (filter #(= (:other % character)) (:knowledge gossip)))))
- 109   + 114  
- 110  (defn interesting-character? + 115  (defn interesting-character?
- 111    "Boolean representation of whether this `character` is interesting to this + 116    "Boolean representation of whether this `character` is interesting to this
- 112    `gossip`." + 117    `gossip`."
- 113    [gossip character] + 118    [gossip character]
- - 114    (> (interest-in-character gossip character) 0)) + + 119    (> (interest-in-character gossip character) 0))
- 115   + 120  
- 116  (defn interest-in-location + 121  (defn interest-in-location
- 117    "Integer representation of how interesting this `location` is to this + 122    "Integer representation of how interesting this `location` is to this
- 118    `gossip`." + 123    `gossip`."
- 119    [gossip location] + 124    [gossip location]
- 120    (cond + 125    (cond
- 121      (and (map? location) (number? (:x location)) (number? (:y location))) + 126      (and (map? location) (number? (:x location)) (number? (:y location)))
- 122      (if-let [home (:home gossip)] + 127      (if-let [home (:home gossip)]
- 123        (let [d (distance-between location home) -
- - 124              i (/ 10000 d) ;; 10000 at metre scale is 10km; interest should -
- - 125              ;;fall of with distance from home, but possibly on a log scale -
- - 126              ] -
- - 127          (if (> i 1) i 0)) -
- - 128        0) + 128        (let [d (distance-between location home)
- 129      (coll? location) + 129              i (/ 10000 d) ;; 10000 at metre scale is 10km; interest should +
+ + 130              ;;fall off with distance from home, but possibly on a log scale +
+ + 131              ] +
+ + 132          (if (> i 1) i 0)) +
+ + 133        0) +
+ + 134      (coll? location)
- 130      (reduce + 135      (reduce
- 131        + + 136        +
- 132        (map + 137        (map
- 133          #(interest-in-location gossip %) + 138          #(interest-in-location gossip %)
- 134          location)) + 139          location))
- 135      :else + 140      :else
- - 136      (count + + 141      (count
- 137        (filter -
- - 138          #(some (fn [x] (= x location)) (:location %)) -
- - 139          (cons {:location (:home gossip)} (:knowledge gossip)))))) -
- - 140   -
- - 141  ;; (interest-in-location {:home [{0, 0} :test-home] :knowledge []} [:test-home]) -
- - 142   -
- - 143  (defn interesting-location? -
- - 144    "True if the location of this news `item` is interesting to this `gossip`." -
- - 145    [gossip item] + 142        (filter
- 146    (> (interest-in-location gossip (:location item)) 0)) + 143          #(some (fn [x] (= x location)) (:location %)) +
+ + 144          (cons {:location (:home gossip)} (:knowledge gossip)))))) +
+ + 145   +
+ + 146  ;; (interest-in-location {:home [{0, 0} :test-home] :knowledge []} [:test-home])
147  
- - 148  (defn interesting-object? + + 148  (defn interesting-location?
- 149    [gossip object] + 149    "True if the location of this news `item` is interesting to this `gossip`."
- 150    ;; TODO: Not yet (really) implemented + 150    [gossip item]
- - 151    true) + + 151    (> (interest-in-location gossip (:location item)) 0))
152  
- - 153  (defn interesting-topic? + + 153  (defn interesting-object?
- 154    [gossip topic] + 154    [gossip object]
155    ;; TODO: Not yet (really) implemented @@ -475,272 +475,302 @@ 157  
+ + 158  (defn interesting-topic? +
+ + 159    [gossip topic] +
+ + 160    ;; TODO: Not yet (really) implemented +
+ + 161    true) +
+ + 162   +
- 158  (defn interesting-item? + 163  (defn interesting-item?
- 159    "True if anything about this news `item` is interesting to this `gossip`." + 164    "True if anything about this news `item` is interesting to this `gossip`."
- 160    [gossip item] + 165    [gossip item]
- 161       (or + 166       (or
- 162         (interesting-character? gossip (:actor item)) + 167         (interesting-character? gossip (:actor item))
- 163         (interesting-character? gossip (:other item)) + 168         (interesting-character? gossip (:other item))
- 164         (interesting-location? gossip (:location item)) + 169         (interesting-location? gossip (:location item))
- 165         (interesting-object? gossip (:object item)) + 170         (interesting-object? gossip (:object item))
- 166         (interesting-topic? gossip (:verb item)))) + 171         (interesting-topic? gossip (:verb item))))
- 167   + 172  
- 168  (defn infer + 173  (defn infer
- 169    "Infer a new knowledge item from this `item`, following this `rule`" + 174    "Infer a new knowledge item from this `item`, following this `rule`"
- 170    [item rule] + 175    [item rule]
- 171    (reduce merge + 176    (reduce merge
- 172            item + 177            item
- 173            (cons + 178            (cons
- 174              {:verb (:verb rule)} + 179              {:verb (:verb rule)}
- 175              (map (fn [k] {k (apply (k rule) (list item))}) + 180              (map (fn [k] {k (apply (k rule) (list item))})
- 176                   (remove -
- - 177                     #(= % :verb) + 181                   (remove
- 178                     (keys rule)))))) + 182                     #(= % :verb) +
+ + 183                     (keys rule))))))
- 179   + 184  
- 180  (declare learn-news-item) + 185  (declare learn-news-item)
- 181   + 186  
- 182  (defn make-all-inferences + 187  (defn make-all-inferences
- 183    "Return a list of knowledge entries inferred from this news `item` by this + 188    "Return a list of knowledge entries that can be inferred from this news
- 184    `gossip`." + 189    `item`."
- 185    [item] + 190    [item]
- 186    (set + 191    (set
- 187      (reduce + 192      (reduce
- 188        concat + 193        concat
- 189        (map + 194        (map
- 190          #(:knowledge (learn-news-item {} (infer item %) false)) + 195          #(:knowledge (learn-news-item {} (infer item %) false))
- 191          (:inferences (news-topics (:verb item))))))) + 196          (:inferences (news-topics (:verb item)))))))
- 192   + 197  
- 193  (defn degrade-character + 198  (defn degrade-character
- 194    "Return a character specification like this `character`, but comprising + 199    "Return a character specification like this `character`, but comprising
- 195    only those properties this `gossip` is interested in." + 200    only those properties this `gossip` is interested in."
- 196    [gossip character] + 201    [gossip character]
- 197    ;; TODO: Not yet (really) implemented + 202    ;; TODO: Not yet (really) implemented
- 198    character) + 203    character)
- 199   + 204  
- 200  (defn degrade-location + 205  (defn degrade-location
- 201    "Return a location specification like this `location`, but comprising + 206    "Return a location specification like this `location`, but comprising
- 202    only those elements this `gossip` is interested in. If none, return + 207    only those elements this `gossip` is interested in. If none, return
- 203    `nil`." + 208    `nil`."
- 204    [gossip location] + 209    [gossip location]
- 205    (let [l (if + 210    (let [l (if
- 206      (coll? location) + 211      (coll? location)
- 207      (filter + 212      (filter
- 208        #(when (interesting-location? gossip %) %) + 213        #(when (interesting-location? gossip %) %)
- 209        location))] + 214        location))]
- 210      (when-not (empty? l) l))) + 215      (when-not (empty? l) l)))
- 211   + 216  
- 212  (defn learn-news-item + 217  (defn learn-news-item
- 213    "Return a gossip like this `gossip`, which has learned this news `item` if + 218    "Return a gossip like this `gossip`, which has learned this news `item` if
- 214    it is of interest to them." + 219    it is of interest to them."
- 215    ;; TODO: Not yet implemented + 220    ;; TODO: Not yet implemented
- 216    ([gossip item] + 221    ([gossip item]
- 217     (learn-news-item gossip item true)) + 222     (learn-news-item gossip item true))
- 218    ([gossip item follow-inferences?] + 223    ([gossip item follow-inferences?]
- 219     (if + 224     (if
- 220       (interesting-item? gossip item) -
- - 221       (let [g (assoc gossip :knowledge -
- - 222                 (cons -
- - 223                   (assoc + 225       (interesting-item? gossip item)
- 224                     item + 226       (let
- - 225                     :nth-hand (if + + 227         [g (assoc
- - 226                                 (number? (:nth-hand item)) -
- - 227                                 (inc (:nth-hand item)) + + 228              gossip
- 228                                 1) + 229              :knowledge
- - 229                     :date (if (number? (:date item)) (:date item) (game-time)) + + 230              (cons +
+ + 231                (assoc +
+ + 232                  item +
+ + 233                  :nth-hand (if +
+ + 234                              (number? (:nth-hand item)) +
+ + 235                              (inc (:nth-hand item)) +
+ + 236                              1) +
+ + 237                  :time-stamp (if +
+ + 238                                (number? (:time-stamp item)) +
+ + 239                                (:time-stamp item) +
+ + 240                                (game-time))
- 230                     :location (degrade-location gossip (:location item)) + 241                  :location (degrade-location gossip (:location item))
- 231                     ;; ought to degratde the location + 242                  ;; TODO: ought to maybe-degrade characters we're not yet interested in
- 232                     ;; ought to maybe-degrade characters we're not yet interested in + 243                  )
- 233                     ) + 244                ;; TODO: ought not to add knowledge items we already have, except
- 234                   ;; ought not to add knowledge items we already have, except -
- - 235                   ;; to replace if new item is of increased specificity + 245                ;; to replace if new item is of increased specificity
- 236                   (:knowledge gossip)))] + 246                (:knowledge gossip)))]
- 237         (if follow-inferences? + 247         (if follow-inferences?
- 238           (assoc + 248           (assoc
- 239             g + 249             g
- 240             :knowledge + 250             :knowledge
- 241             (concat (:knowledge g) (make-all-inferences item))) + 251             (concat (:knowledge g) (make-all-inferences item)))
- 242           g)) + 252           g))
- 243       gossip))) + 253       gossip)))
- 244   + 254  
- 245   + 255  
- 246   + 256  
diff --git a/docs/cloverage/the_great_game/merchants/markets.clj.html b/docs/cloverage/the_great_game/merchants/markets.clj.html index 46dc44a..03ace93 100644 --- a/docs/cloverage/the_great_game/merchants/markets.clj.html +++ b/docs/cloverage/the_great_game/merchants/markets.clj.html @@ -37,13 +37,13 @@ 011    (let
- + 012      [delta (dec' (/ (max supply demand 1) (max stock 1)))
- + 013       scaled (/ delta 100)]
- + 014      (+ old scaled)))
@@ -91,7 +91,7 @@ 029          su (or (-> c :supplies commodity) 0)
- + 030          decrement (min st d)
@@ -103,7 +103,7 @@ 033                      ;; stock, halt production
- + 034                      (> st (* su 2))
@@ -115,7 +115,7 @@ 037                      ;; craftspeople of the city will do so.
- + 038                      (> p 1) su
@@ -127,10 +127,10 @@ 041                      ;; incoming merchants to buy
- + 042                      (> su st)
- + 043                      (- su st)
@@ -148,7 +148,7 @@ 048        (not= p n)
- + 049        (l/info "Price of" commodity "at" id "has changed from" (float p) "to" (float n)))
@@ -157,7 +157,7 @@ 051                {:stock
- + 052                 {commodity (+ (- st decrement) increment)}
diff --git a/docs/cloverage/the_great_game/merchants/merchant_utils.clj.html b/docs/cloverage/the_great_game/merchants/merchant_utils.clj.html index 8774b44..dc586ef 100644 --- a/docs/cloverage/the_great_game/merchants/merchant_utils.clj.html +++ b/docs/cloverage/the_great_game/merchants/merchant_utils.clj.html @@ -94,7 +94,7 @@ 030        (map
- + 031          #(* (cargo %) (-> world :commodities % :weight))
@@ -133,16 +133,16 @@ 043              merchant)]
- + 044      (max
045        0
- + 046        (quot
- + 047          (- (or (:capacity m) 0) (burden m world))
@@ -199,7 +199,7 @@ 065        :else
- + 066        (quot
@@ -238,7 +238,7 @@ 078      (map
- + 079        #(hash-map % (+ (or (a %) 0) (or (b %) 0)))
diff --git a/docs/cloverage/the_great_game/merchants/planning.clj.html b/docs/cloverage/the_great_game/merchants/planning.clj.html index fcbe3f8..add36f9 100644 --- a/docs/cloverage/the_great_game/merchants/planning.clj.html +++ b/docs/cloverage/the_great_game/merchants/planning.clj.html @@ -136,13 +136,13 @@ 044                             %)
- + 045           :distance (count
046                       (find-route world origin %))
- + 047           :dist-to-home (count
@@ -157,7 +157,7 @@ 051                             %)))
- + 052        (remove #(= % origin) (-> world :cities keys)))))
@@ -304,7 +304,7 @@ 100          ;; to home.
- + 101          #(- 0 (:dist-to-home %))
@@ -376,7 +376,7 @@ 124              (can-afford merchant world c))
- + 125          p (* q (- (:expected-price plan) (:buy-price plan)))]
@@ -442,7 +442,7 @@ 146                    #(let [q (-> world :cities origin :stock %)]
- + 147                       (and (number? q) (pos? q)))
@@ -460,7 +460,7 @@ 152          (sort-by
- + 153            #(- 0 (:dist-to-home %))
diff --git a/docs/cloverage/the_great_game/merchants/strategies/simple.clj.html b/docs/cloverage/the_great_game/merchants/strategies/simple.clj.html index 7f5ba97..ec1ab97 100644 --- a/docs/cloverage/the_great_game/merchants/strategies/simple.clj.html +++ b/docs/cloverage/the_great_game/merchants/strategies/simple.clj.html @@ -109,7 +109,7 @@ 035          [c (:commodity plan)
- + 036           p (* (:quantity plan) (:buy-price plan))
@@ -127,7 +127,7 @@ 041            {:stock (add-stock (:stock m) {c q})
- + 042             :cash (- (:cash m) p)
@@ -142,16 +142,16 @@ 046           {location
- + 047            {:stock (assoc (:stock market) c (- (-> market :stock c) q))
- + 048             :cash (+ (:cash market) p)}}})
049        ;; if no plan, then if at home stay put
- + 050        (= (:location m) (:home m))
@@ -172,7 +172,7 @@ 056        (let [route (find-route world location (:home m))
- + 057              next-location (nth route 1)]
@@ -310,7 +310,7 @@ 102                        (map
- + 103                          #(* (-> m :stock %) (-> market :prices m))
@@ -322,7 +322,7 @@ 106      (if
- + 107        (>= (:cash market) stock-value)
@@ -352,7 +352,7 @@ 116                {:stock {}
- + 117                 :cash (+ (:cash m) stock-value)
@@ -367,7 +367,7 @@ 121                {:stock (add-stock (:stock m) (:stock market))
- + 122                 :cash (- (:cash market) stock-value)}}})))
@@ -412,7 +412,7 @@ 136          id (:id m)
- + 137          at-destination? (and (:plan m) (= (:location m) (-> m :plan :destination)))
@@ -421,7 +421,7 @@ 139          next-location (if plan
- + 140                          (nth
diff --git a/docs/cloverage/the_great_game/time.clj.html b/docs/cloverage/the_great_game/time.clj.html index 2c7d56e..25e2b11 100644 --- a/docs/cloverage/the_great_game/time.clj.html +++ b/docs/cloverage/the_great_game/time.clj.html @@ -136,7 +136,7 @@ 044    "This world has an eight day week."
- + 045    (count days-of-week))
@@ -190,7 +190,7 @@ 062    different."
- + 063    (count seasons-of-year))
@@ -220,7 +220,7 @@ 072    five weeks."
- + 073    (count weeks-of-season))
@@ -229,7 +229,7 @@ 075  (def ^:const days-in-season
- + 076    (* weeks-in-season days-in-week))
@@ -250,13 +250,13 @@ 082    ([timestamp]
- + 083     (- timestamp game-start-time)))
084  
- + 085  (defmacro day-of-year
@@ -289,7 +289,7 @@ 095      (fn [game-time]
- + 096          (>=
@@ -316,10 +316,10 @@ 104      (if (waiting-day? game-time)
- + 105        (nth weeks-of-season day-of-week)
- + 106        (nth days-of-week day-of-week))))
@@ -337,7 +337,7 @@ 111    (let [day-of-season (mod (day-of-year game-time) days-in-season)
- + 112          week (/ day-of-season days-in-week)]
@@ -346,7 +346,7 @@ 114        :waiting
- + 115        (nth weeks-of-season week))))
@@ -358,7 +358,7 @@ 118    [game-time]
- + 119    (let [season (int (/ (day-of-year game-time) days-in-season))]
@@ -367,7 +367,7 @@ 121        :waiting
- + 122        (nth seasons-of-year season))))
@@ -403,7 +403,7 @@ 133           (name
- + 134             (nth
diff --git a/docs/cloverage/the_great_game/utils.clj.html b/docs/cloverage/the_great_game/utils.clj.html index f07ef01..142a6e9 100644 --- a/docs/cloverage/the_great_game/utils.clj.html +++ b/docs/cloverage/the_great_game/utils.clj.html @@ -19,7 +19,7 @@ 005    [route]
- + 006    (not= (count route)(count (set route))))
@@ -103,7 +103,7 @@ 033               (list (first %) 'm)
- + 034               (nth % 1))
diff --git a/docs/cloverage/the_great_game/world/location.clj.html b/docs/cloverage/the_great_game/world/location.clj.html index 195df85..9b943f9 100644 --- a/docs/cloverage/the_great_game/world/location.clj.html +++ b/docs/cloverage/the_great_game/world/location.clj.html @@ -112,7 +112,7 @@ 036        (and c1 c2)
- + 037        (sqrt (+ (expt (- (:x c1) (:x c2)) 2) (expt (- (:y c1) (:y c2)) 2))))))
diff --git a/docs/cloverage/the_great_game/world/routes.clj.html b/docs/cloverage/the_great_game/world/routes.clj.html index 730f295..5260748 100644 --- a/docs/cloverage/the_great_game/world/routes.clj.html +++ b/docs/cloverage/the_great_game/world/routes.clj.html @@ -49,10 +49,10 @@ 015             (remove
- + 016               #(= from %)
- + 017               (if (some #(= % from) route) route)))
@@ -67,7 +67,7 @@ 021           found (filter
- + 022                   (fn [step] (if (some #(= to %) step) step))
@@ -121,7 +121,7 @@ 039             found (filter
- + 040                     #(= (last %) to) paths)]
diff --git a/docs/cloverage/the_great_game/world/run.clj.html b/docs/cloverage/the_great_game/world/run.clj.html index e6ea4e4..f56fd11 100644 --- a/docs/cloverage/the_great_game/world/run.clj.html +++ b/docs/cloverage/the_great_game/world/run.clj.html @@ -58,7 +58,7 @@ 018                  {:path "the-great-game.log"
- + 019                   :max-size (* 512 1024)
diff --git a/docs/cloverage/the_great_game/world/world.clj.html b/docs/cloverage/the_great_game/world/world.clj.html index 94d91d0..1f6afad 100644 --- a/docs/cloverage/the_great_game/world/world.clj.html +++ b/docs/cloverage/the_great_game/world/world.clj.html @@ -571,7 +571,7 @@ 189    ([world]
- + 190     (run world (inc (or (:date world) 0))))
diff --git a/docs/codox/Baking-the-world.html b/docs/codox/Baking-the-world.html index 62eb476..bd493e8 100644 --- a/docs/codox/Baking-the-world.html +++ b/docs/codox/Baking-the-world.html @@ -1,6 +1,6 @@ -Baking the world

Baking the world

+Baking the world

Baking the world

Wednesday, 8 May 2019

Devogilla’s Bridge in Dumfries, early foourteenth century

In previous posts, I’ve described algorithms for dynamically populating and dynamically settling a game world. But at kilometre scale (and I think we need a higher resolution than that - something closer to hectare scale), settling the British Isles using my existing algorithms takes about 24 hours of continuous compute on an eight core, 3GHz machine. You cannot do that every time you launch a new game.

diff --git a/docs/codox/Game_Play.html b/docs/codox/Game_Play.html index 2743a62..a1d8141 100644 --- a/docs/codox/Game_Play.html +++ b/docs/codox/Game_Play.html @@ -1,6 +1,6 @@ -Game Play

Game Play

+Game Play

Game Play

The principles of game play which I’m looking for are a reaction against all I see as wrong in modern video games. So let’s set out what these are:

  1. diff --git a/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html b/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html index 2061af4..33918d7 100644 --- a/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html +++ b/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html @@ -1,6 +1,6 @@ -Gossip, scripted plot, and Johnny Silverhand

    Gossip, scripted plot, and Johnny Silverhand

    +Gossip, scripted plot, and Johnny Silverhand

    Gossip, scripted plot, and Johnny Silverhand

    I’ve been writing literally for years – since Voice acting considered harmful in 2015 – about game worlds in which the player speaks to non-player characters just by speaking the words they choose in their normal voice, and the non-player character replies using a pipeline that goes, essentially,

    1. Alexa/Siri style speech interpretation;
    2. diff --git a/docs/codox/Organic_Quests.html b/docs/codox/Organic_Quests.html index 392187e..055e53e 100644 --- a/docs/codox/Organic_Quests.html +++ b/docs/codox/Organic_Quests.html @@ -1,6 +1,6 @@ -Organic Quests

      Organic Quests

      +Organic Quests

      Organic Quests

      The structure of a modern Role Playing Came revolves around ‘quests’: tasks that the player character is invited to do, either by the framing narrative of the game or by some non-player character (‘the Quest Giver’). Normally there is one core quest which provides the overarching narrative for the whole game. [Wikipedia](https://en.wikipedia.org/wiki/Quest_(gaming)) offers a typology of quests as follows:

      1. Kill quests
      2. diff --git a/docs/codox/Populating-a-game-world.html b/docs/codox/Populating-a-game-world.html index e1886fc..c02a951 100644 --- a/docs/codox/Populating-a-game-world.html +++ b/docs/codox/Populating-a-game-world.html @@ -1,6 +1,6 @@ -Populating a game world

        Populating a game world

        +Populating a game world

        Populating a game world

        Saturday, 6 July 2013

        (You might want to read this essay in conjunction with my older essay, Settling a game world, which covers similar ground but which this hopefully advances on)

        For an economy to work people have to be able to move between occupations to fill economic niches. In steady state, non player character (NPC) males become adult as ‘vagrants’, and then move through the state transitions described in this document. The pattern for females is different.

        diff --git a/docs/codox/Settling-a-game-world.html b/docs/codox/Settling-a-game-world.html index 357ea68..cbf569e 100644 --- a/docs/codox/Settling-a-game-world.html +++ b/docs/codox/Settling-a-game-world.html @@ -1,6 +1,6 @@ -Settling a game world

        Settling a game world

        +Settling a game world

        Settling a game world

        Wednesday, 30 December 2009

        This essay is part of a series with ‘Worlds and Flats’ and ‘The spread of knowledge in a large game world’; if you haven’t read those you may want to read them before reading this. This essay describes how a large world can come into being and can evolve. I’ve written again on this subject since - see ‘Populating a game world’)

        Microworld

        diff --git a/docs/codox/Simulation-layers.html b/docs/codox/Simulation-layers.html index 24d074d..0e37f3a 100644 --- a/docs/codox/Simulation-layers.html +++ b/docs/codox/Simulation-layers.html @@ -1,6 +1,6 @@ -Simulation layers

        Simulation layers

        +Simulation layers

        Simulation layers

        In essence, the environment for The Great Game is broadly descended from games like the original Elite space trading game, and Sid Meier’s Pirates!, with some elements from political simulations like for example SimCity.

        That is to say there is

        An economy simulation

        diff --git a/docs/codox/The-spread-of-knowledge-in-a-large-game-world.html b/docs/codox/The-spread-of-knowledge-in-a-large-game-world.html index d20d166..eb95181 100644 --- a/docs/codox/The-spread-of-knowledge-in-a-large-game-world.html +++ b/docs/codox/The-spread-of-knowledge-in-a-large-game-world.html @@ -1,6 +1,6 @@ -The spread of knowledge in a large game world

        The spread of knowledge in a large game world

        +The spread of knowledge in a large game world

        The spread of knowledge in a large game world

        Saturday, 26 April 2008

        part of the role of Dandelion, in The Witcher games, is to provide the player with news

        Note

        diff --git a/docs/codox/Uncanny_dialogue.html b/docs/codox/Uncanny_dialogue.html index 480c253..e3e619e 100644 --- a/docs/codox/Uncanny_dialogue.html +++ b/docs/codox/Uncanny_dialogue.html @@ -1,6 +1,6 @@ -The Uncanny Valley, and dynamically generated dialogue

        The Uncanny Valley, and dynamically generated dialogue

        +The Uncanny Valley, and dynamically generated dialogue

        The Uncanny Valley, and dynamically generated dialogue

        If the player is allowed to just speak arbitrary dialogue, then the conversation animation of the player character cannot be designed. If non-player characters are able to engage dynamically generated dialogue, in response to events in the game which are not scripted, then their conversation animation for those dialogues cannot be designed. So conversation animation must almost always be dynamically generated, largely from an augmented text of the speech act. With non-player characters, emotional content of a speech act can be generated by exactly the same process which generates the text. Extracting emotional content information from the player character’s voice may be more challenging.

        It would be possible to avoid animating the player character’s face by using a first-person camera. However, I don’t personally find this makes for a very engaging game experience.

        These thoughts were prompted by a very interesting video and Twitter thread about the perceived failings in the character animation system of Mass Effect Andromeda.

        diff --git a/docs/codox/Voice-acting-considered-harmful.html b/docs/codox/Voice-acting-considered-harmful.html index b5fbd6c..17e9dec 100644 --- a/docs/codox/Voice-acting-considered-harmful.html +++ b/docs/codox/Voice-acting-considered-harmful.html @@ -1,6 +1,6 @@ -Voice acting considered harmful

        Voice acting considered harmful

        +Voice acting considered harmful

        Voice acting considered harmful

        Wednesday, 25 February 2015

        The Witcher: Conversation with Kalkstein

        Long, long, time ago, I can still remember when… we played (and wrote) adventure games where the user typed at a command line, and the system printed back at them. A Read-Eval-Print loop in the classic Lisp sense, and I wrote my adventure games in Lisp. I used the same opportunistic parser whether the developer was building the game Create a new room north of here called dungeon-3 the player was playing the game Pick up the rusty sword and go north or the player was talking to a non-player character Say to the wizard ‘can you tell me the way to the castle’ Of course, the parser didn’t ‘understand’ English. It worked on trees of words, in which terminal nodes were actions and branching nodes were key words, and it had the property that any word it didn’t recognise at that point in sentence was a noise word and could be ignored. A few special hacks (such as ‘the’, ‘a’, or ‘an’ was an indicator that what came next was probably a noun phrase, and thus that if there was more than one sword in the player’s immediate environment the one that was wanted was the one tagged with the adjective ‘rusty’), and you ended up with a parser that most of the time convincingly interpreted most of what the player threw at it.

        diff --git a/docs/codox/economy.html b/docs/codox/economy.html index c8264d5..8e93312 100644 --- a/docs/codox/economy.html +++ b/docs/codox/economy.html @@ -1,6 +1,6 @@ -Game world economy

        Game world economy

        +Game world economy

        Game world economy

        Broadly this essay extends ideas presented in Populating a game world, q.v.

        Primary producers

        Herdsfolk

        diff --git a/docs/codox/index.html b/docs/codox/index.html index 05dd2bc..095c01b 100644 --- a/docs/codox/index.html +++ b/docs/codox/index.html @@ -1,3 +1,3 @@ -The-great-game 0.1.1-SNAPSHOT

        The-great-game 0.1.1-SNAPSHOT

        Released under the GNU General Public License,version 2.0 or (at your option) any later version

        Prototype code towards the great game I've been writing about for ten years, and know I will never finish.

        Installation

        To install, add the following dependency to your project or build file:

        [the-great-game "0.1.1-SNAPSHOT"]

        Topics

        Namespaces

        the-great-game.agent.agent

        Anything in the game world with agency

        Public variables and functions:

          the-great-game.gossip.gossip

          Interchange of news events between gossip agents

          Public variables and functions:

          the-great-game.merchants.markets

          Adjusting quantities and prices in markets.

          Public variables and functions:

          the-great-game.merchants.merchant-utils

          Useful functions for doing low-level things with merchants.

          the-great-game.merchants.merchants

          Trade planning for merchants, primarily.

          Public variables and functions:

          the-great-game.merchants.planning

          Trade planning for merchants, primarily. This follows a simple-minded generate-and-test strategy and currently generates plans for all possible routes from the current location. This may not scale. Also, routes do not currently have cost or risk associated with them.

          the-great-game.merchants.strategies.simple

          Default trading strategy for merchants.

          Public variables and functions:

          the-great-game.utils

          TODO: write docs

          Public variables and functions:

          the-great-game.world.location

          Functions dealing with location in the world.

          Public variables and functions:

          the-great-game.world.routes

          Conceptual (plan level) routes, represented as tuples of location ids.

          Public variables and functions:

          the-great-game.world.run

          Run the whole simulation

          Public variables and functions:

          the-great-game.world.world

          Access to data about the world

          Public variables and functions:

          \ No newline at end of file +The-great-game 0.1.1

          The-great-game 0.1.1

          Released under the GNU General Public License,version 2.0 or (at your option) any later version

          Prototype code towards the great game I've been writing about for ten years, and know I will never finish.

          Installation

          To install, add the following dependency to your project or build file:

          [the-great-game "0.1.1"]

          Topics

          Namespaces

          the-great-game.agent.agent

          Anything in the game world with agency

          Public variables and functions:

            the-great-game.gossip.gossip

            Interchange of news events between gossip agents

            Public variables and functions:

            the-great-game.merchants.markets

            Adjusting quantities and prices in markets.

            Public variables and functions:

            the-great-game.merchants.merchant-utils

            Useful functions for doing low-level things with merchants.

            the-great-game.merchants.merchants

            Trade planning for merchants, primarily.

            Public variables and functions:

            the-great-game.merchants.planning

            Trade planning for merchants, primarily. This follows a simple-minded generate-and-test strategy and currently generates plans for all possible routes from the current location. This may not scale. Also, routes do not currently have cost or risk associated with them.

            the-great-game.merchants.strategies.simple

            Default trading strategy for merchants.

            Public variables and functions:

            the-great-game.utils

            TODO: write docs

            Public variables and functions:

            the-great-game.world.location

            Functions dealing with location in the world.

            Public variables and functions:

            the-great-game.world.routes

            Conceptual (plan level) routes, represented as tuples of location ids.

            Public variables and functions:

            the-great-game.world.run

            Run the whole simulation

            Public variables and functions:

            the-great-game.world.world

            Access to data about the world

            Public variables and functions:

            \ No newline at end of file diff --git a/docs/codox/intro.html b/docs/codox/intro.html index 59c29c7..f7de5af 100644 --- a/docs/codox/intro.html +++ b/docs/codox/intro.html @@ -1,6 +1,6 @@ -Introduction to the-great-game

            Introduction to the-great-game

            +Introduction to the-great-game

            Introduction to the-great-game

            The Great Game

            In this essay I’m going to try to pull together a number of my architectural ideas about the Great Game which I know I’m never actually going to build - because it’s vastly too big for any one person to build - into one overall vision.

            So, firstly, how does one characterise this game?

            diff --git a/docs/codox/modelling_trading_cost_and_risk.html b/docs/codox/modelling_trading_cost_and_risk.html index b568591..867badf 100644 --- a/docs/codox/modelling_trading_cost_and_risk.html +++ b/docs/codox/modelling_trading_cost_and_risk.html @@ -1,6 +1,6 @@ -Modelling trading cost and risk

            Modelling trading cost and risk

            +Modelling trading cost and risk

            Modelling trading cost and risk

            In a dynamic pre-firearms world with many small states and contested regions, trade is not going to be straightforward. Not only will different routes have different physical characteristics - more or less mountainous, more or fewer unbridged river crossings - they will also have different political characteristics: more of less taxed, more or less effectively policed.

            Raids by outlaws are expected to be part of the game economy. News of raids are the sort of things which may propagate through the gossip system. So are changes in taxation regime. Obviously, knowledge items can affect merchants’ trading strategy; in existing prototype code, individual merchants already each keep their own cache of known historical prices, and exchange historical price data with one another; and use this price data to select trades to make.

            So: to what extent is it worth modelling the spread of knowledge of trade cost and risk?

            diff --git a/docs/codox/naming-of-characters.html b/docs/codox/naming-of-characters.html index 42d633a..0fb4044 100644 --- a/docs/codox/naming-of-characters.html +++ b/docs/codox/naming-of-characters.html @@ -1,6 +1,6 @@ -Naming of Characters

            Naming of Characters

            +Naming of Characters

            Naming of Characters

            Generally speaking, in modern RPGs, every character with any impact on the plot has a distinct name. But if we are going to give all non-player characters sufficient agency to impact on the plot, then we must have a way of naming tens or hundreds of thousands of characters, and distinct names will become problematic (even if we’re procedurally generating names, which we shall have to do. So this note is about how characters are named.

            The full name of each character will be made up as follows:

            [epithet] [clan] [personal-name] the [trade-or-rank] of [location], son/daughter of [parent]

            diff --git a/docs/codox/on-dying.html b/docs/codox/on-dying.html index 3120d3a..2f3206e 100644 --- a/docs/codox/on-dying.html +++ b/docs/codox/on-dying.html @@ -1,6 +1,6 @@ -On Dying

            On Dying

            +On Dying

            On Dying

            Death is the end of your story. One of the tropes in games which, for me, most breaks immersion is when you lose a fight and are presented with a screen that says ‘you are dead. Do you want to reload your last save?’ Life is not like that. We do not have save-states. We die.

            So how could this be better handled?

            You lose a fight. Switch to cutscene: the battlefield, after the fight, your body is there. Probably no sound. A party of non-enemies crosses the battlefield and finds your body. We see surprise and concern. They gather around you. Cut to interior scene, you are in a bed, unconcious, being tended; cut to similar interior scene, you are in a bed, conscious, being tended; cut to exterior scene, you are sitting with some of your saviours, and the game restarts.

            diff --git a/docs/codox/sandbox.html b/docs/codox/sandbox.html index f3a2a72..6b51109 100644 --- a/docs/codox/sandbox.html +++ b/docs/codox/sandbox.html @@ -1,6 +1,6 @@ -Sandbox

            Sandbox

            +Sandbox

            Sandbox

            Up to now I’ve been thinking of the Great Game as essentially an RPG with some sandbox-like elements; but I think it may be better to think of it as a sandbox game with some RPG like elements.

            Why?

            The core of the game is a world in which non-player characters have enough individual knowledge of the world and their immediate surroundings that they can sensibly answer questions like

            diff --git a/docs/codox/sexual-dimorphism.html b/docs/codox/sexual-dimorphism.html index 25ce9d2..901ec84 100644 --- a/docs/codox/sexual-dimorphism.html +++ b/docs/codox/sexual-dimorphism.html @@ -1,6 +1,6 @@ -Sexual dimorphism

            Sexual dimorphism

            +Sexual dimorphism

            Sexual dimorphism

            This essay is going to upset a lot of people, so let’s start with a statement of what it is about: it is an attempt to describe the systematically different behaviours of men and women, in sufficient detail that this can be represented by agents in a game world. It’s trying to allow as broad as possible a range of cultures to be represented, so when I’m talking about what I consider to be behaviours of particular cultures, I’ll say that.

            Of course, I’m writing this from the view point of an old white male. It’s not possible to write about these things from a totally neutral viewpoint, and every one of us will have prejudices.

            OK? Let’s start.

            diff --git a/docs/codox/the-great-game.agent.agent.html b/docs/codox/the-great-game.agent.agent.html index 90c31c3..bab56e9 100644 --- a/docs/codox/the-great-game.agent.agent.html +++ b/docs/codox/the-great-game.agent.agent.html @@ -1,3 +1,3 @@ -the-great-game.agent.agent documentation

            the-great-game.agent.agent

            Anything in the game world with agency

            \ No newline at end of file +the-great-game.agent.agent documentation

            the-great-game.agent.agent

            Anything in the game world with agency

            \ No newline at end of file diff --git a/docs/codox/the-great-game.gossip.gossip.html b/docs/codox/the-great-game.gossip.gossip.html index aa503f5..e731d5e 100644 --- a/docs/codox/the-great-game.gossip.gossip.html +++ b/docs/codox/the-great-game.gossip.gossip.html @@ -1,3 +1,3 @@ -the-great-game.gossip.gossip documentation

            the-great-game.gossip.gossip

            Interchange of news events between gossip agents

            dialogue

            (dialogue enquirer respondent world)

            Dialogue between an enquirer and an agent in this world; returns a map identical to enquirer except that its :gossip collection may have additional entries.

            gather-news

            (gather-news world)(gather-news world gossip)

            TODO: write docs

            move-gossip

            (move-gossip gossip world new-location)

            Return a world like this world but with this gossip moved to this new-location. Many gossips are essentially shadow-records of agents of other types, and the movement of the gossip should be controlled by the run function of the type of the record they shadow. The #run function below does NOT call this function.

            run

            (run world)

            Return a world like this world, with news items exchanged between gossip agents.

            \ No newline at end of file +the-great-game.gossip.gossip documentation

            the-great-game.gossip.gossip

            Interchange of news events between gossip agents

            dialogue

            (dialogue enquirer respondent world)

            Dialogue between an enquirer and an agent in this world; returns a map identical to enquirer except that its :gossip collection may have additional entries.

            gather-news

            (gather-news world)(gather-news world gossip)

            TODO: write docs

            move-gossip

            (move-gossip gossip world new-location)

            Return a world like this world but with this gossip moved to this new-location. Many gossips are essentially shadow-records of agents of other types, and the movement of the gossip should be controlled by the run function of the type of the record they shadow. The #run function below does NOT call this function.

            run

            (run world)

            Return a world like this world, with news items exchanged between gossip agents.

            \ No newline at end of file diff --git a/docs/codox/the-great-game.gossip.news-items.html b/docs/codox/the-great-game.gossip.news-items.html index 425c54d..acb2ade 100644 --- a/docs/codox/the-great-game.gossip.news-items.html +++ b/docs/codox/the-great-game.gossip.news-items.html @@ -1,6 +1,6 @@ -the-great-game.gossip.news-items documentation

            the-great-game.gossip.news-items

            Categories of news events interesting to gossip agents

            degrade-character

            (degrade-character gossip character)

            Return a character specification like this character, but comprising only those properties this gossip is interested in.

            degrade-location

            (degrade-location gossip location)

            Return a location specification like this location, but comprising only those elements this gossip is interested in. If none, return nil.

            infer

            (infer item rule)

            Infer a new knowledge item from this item, following this rule

            interest-in-character

            (interest-in-character gossip character)

            Integer representation of how interesting this character is to this gossip. TODO: this assumes that characters are passed as keywords, but, as documented above, they probably have to be maps, to allow for degradation.

            interest-in-location

            (interest-in-location gossip location)

            Integer representation of how interesting this location is to this gossip.

            interesting-character?

            (interesting-character? gossip character)

            Boolean representation of whether this character is interesting to this gossip.

            interesting-item?

            (interesting-item? gossip item)

            True if anything about this news item is interesting to this gossip.

            interesting-location?

            (interesting-location? gossip item)

            True if the location of this news item is interesting to this gossip.

            interesting-object?

            (interesting-object? gossip object)

            TODO: write docs

            interesting-topic?

            (interesting-topic? gossip topic)

            TODO: write docs

            learn-news-item

            (learn-news-item gossip item)(learn-news-item gossip item follow-inferences?)

            Return a gossip like this gossip, which has learned this news item if it is of interest to them.

            make-all-inferences

            (make-all-inferences item)

            Return a list of knowledge entries that can be inferred from this news item.

            news-topics

            Topics of interest to gossip agents. Topics are keyed in this map by their verbs. The keys associated with each topic are the extra pieces of information required to give context to a gossip item. Generally:

            +the-great-game.gossip.news-items documentation

            the-great-game.gossip.news-items

            Categories of news events interesting to gossip agents

            degrade-character

            (degrade-character gossip character)

            Return a character specification like this character, but comprising only those properties this gossip is interested in.

            degrade-location

            (degrade-location gossip location)

            Return a location specification like this location, but comprising only those elements this gossip is interested in. If none, return nil.

            infer

            (infer item rule)

            Infer a new knowledge item from this item, following this rule

            interest-in-character

            (interest-in-character gossip character)

            Integer representation of how interesting this character is to this gossip. TODO: this assumes that characters are passed as keywords, but, as documented above, they probably have to be maps, to allow for degradation.

            interest-in-location

            (interest-in-location gossip location)

            Integer representation of how interesting this location is to this gossip.

            interesting-character?

            (interesting-character? gossip character)

            Boolean representation of whether this character is interesting to this gossip.

            interesting-item?

            (interesting-item? gossip item)

            True if anything about this news item is interesting to this gossip.

            interesting-location?

            (interesting-location? gossip item)

            True if the location of this news item is interesting to this gossip.

            interesting-object?

            (interesting-object? gossip object)

            TODO: write docs

            interesting-topic?

            (interesting-topic? gossip topic)

            TODO: write docs

            learn-news-item

            (learn-news-item gossip item)(learn-news-item gossip item follow-inferences?)

            Return a gossip like this gossip, which has learned this news item if it is of interest to them.

            make-all-inferences

            (make-all-inferences item)

            Return a list of knowledge entries that can be inferred from this news item.

            news-topics

            Topics of interest to gossip agents. Topics are keyed in this map by their verbs. The keys associated with each topic are the extra pieces of information required to give context to a gossip item. Generally: