Further work on documentation and thinking. Not all tests pass.

This commit is contained in:
Simon Brooke 2020-04-15 18:46:43 +01:00
parent 3fcf16e079
commit bc7e0f44d3
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
13 changed files with 108 additions and 52 deletions

View file

@ -16,7 +16,7 @@
But, before going there, to summarise the proving stage. The inputs are:
1. A raster height map (although this could be randomly generated using any one of many fractal algorithms) - this probably uses ideas from [tessellated multi-layer height map](../../2013/07/tessellated-multi-layer-height-map.html);
1. A raster height map (although this could be randomly generated using any one of many fractal algorithms) - this probably uses ideas from [tessellated multi-layer height map](https://blog.journeyman.cc/2013/07/tessellated-multi-layer-height-map.html);
1. Optionally, a raster rainfall map at 1km resolution (although my personal preference is that this should be generated procedurally from the height map).
The outputs are
@ -26,7 +26,7 @@
1. A database of settlers and their settlements, such that the settlements have x,y co-ordinates;
1. A vector road map.
In this sense, the 'biome map' is just the end state of a [Microworld](../../2014/08/modelling-settlement-with-cellular.html) run. The 'biomes' include things like 'forest', 'scrub', 'heath', 'pasture', but they may also include human settlement, and even settlement by different cultural groups.
In this sense, the 'biome map' is just the end state of a [Microworld](https://blog.journeyman.cc/2014/08/modelling-settlement-with-cellular.html) run. The 'biomes' include things like 'forest', 'scrub', 'heath', 'pasture', but they may also include human settlement, and even settlement by different cultural groups.
This gives us all we need to vegetate and furnish the world. When rendering each square metre we have

View file

@ -27,24 +27,46 @@ _This version of this essay has been adapted to use the code in `the-great-game.
Obviously, news is more valuable if the people involved are important or notorious: the significance of a story is probably the product of the significance of the people concerned.
So a news item becomes a tuple
So a news item becomes a map with keys similar to
`(days-old nth-hand significance action (actors))`
[:verb :actor :other :location :nth-hand :time-stamp]
The [exact keys for each verb are specified here](the-great-game.gossip.news-items.html#var-news-topics).
for example
`(54 2 10 'killed '(fred joe))`
{:verb :kill,
:actor {:id :fred :name "Fred"},
:other {:id :joe :name "Joe"},
:location [{45467 78613} :hanshua :plateau],
:nth-hand 3,
:time-stamp 17946463}
meaning 'I spoke to a man who'd spoken to a man who said he saw notorious fred kill well-liked joe on 54 days ago'. Obviously, the non-player character must be able to construct a natural language sentence from the tuple when speaking within the hearing of a player character, but there's no need for a non-player character to produce a natural language sentence for another non-player character to parse; instead they can just exchange tuples.
meaning 'I spoke to a man who'd spoken to a man who said he saw fred kill joe at the game time represented by the time stamp 17946463, at the coordinates {45467 78613} in Hans'hua on the Plateau'. Obviously, the non-player character must be able to construct a natural language sentence from the tuple when speaking within the hearing of a player character, but there's no need for a non-player character to produce a natural language sentence for another non-player character to parse; instead they can just exchange tuples.
But if we're exchanging knowledge between agents, then agents must have a means of representing knowledge. This knowledge is an association between subjects and sets of statement, such that when the agent learns the statement
`(54 2 10 'killed '(fred joe))`
{:verb :kill,
:actor {:id :fred :name "Fred"},
:other {:id :joe :name "Joe"},
:location [{45467 78613} :hanshua :plateau],
:nth-hand 3,
:time-stamp 17946463}
it adds this statement (with the 2 incremented to 3) to the set of statements it knows about fred and also to the set of statements it knows about joe. It's possible that the receiving agent could then challenge for further statements about fred and/or joe, the automated equivalent of a 'who's joe?' question.
There could be feedback in this. Fred's and joe's significance scores could be incremented for each character to whom the statement is passed on, increasing the likeliness that fred, at least, would feature in more news stories in future. There needs also to be some means of managing how the non-player character's attitude to the subjects of the statement are affected. For example, If fred kills joe, and the character (say bill) receiving the news feels positively towards joe, then bill's attitude to fred should become sharply more hostile. If bill feels neutral about joe, then bill's attitude to fred should still become a bit more hostile, since killing people is on the whole a bad thing. But it bill feels very hostile towards joe, then bill's attitude to fred should become more friendly.
But also, the added knowledge is *degraded*. If the recipient isn't from Hans'hua, the exact location isn't meaningful to them, for example. If the recipient isn't interested in Joe, precisely who was killed may be forgotten. So what is stored could become:
{:verb :kill,
:actor {:id :fred :name "Fred"},
:location [:hanshua :plateau],
:nth-hand 4,
:time-stamp 17946463}
The timestamp could also be degraded, or lost altother - although how exactly this is represnted I'm not certain. Someone interested in the incident may remember 'it was exactly 17 days ago', whereas someone else may remember that it was 'this month, I think'.
Obviously the rate of decay, and the degree of randomness, of the news-passing algorithm would need to be tuned, but this schema seems to me to describe a system with the following features:
* Non-player characters can respond to questions about significant things which happen in the world - without it all having to be scripted

View file

@ -1,6 +1,6 @@
# Game world economy
Broadly this essay extends ideas presented in [Populating a game world](https://blog.journeyman.cc/2013/07/populating-game-world.html), q.v.
Broadly this essay extends ideas presented in [Populating a game world](Populating-a-game-world.html), q.v.
## Primary producers

View file

@ -19,7 +19,7 @@ that I need to be able to use it to tell stories, in order to create initial
threads of narrative from which players can start their exploration.
Note that, by 'conflict', here, I explicitly do not mean 'killing people',
or even 'killing non-player characters'. I have [written extensively](https://blog.journeyman.cc/2015/02/voice-acting-considered-harmful.html)
or even 'killing non-player characters'. I have [written extensively](Voice-acting-considered-harmful.html)
about the problem in many current video games that all too often the only
way of interacting with non-player characters is to kill them. Killing
people should be one of the potential ways of resolving conflicts, because
@ -32,18 +32,18 @@ repertoire of speech.
## Previous essays that are relevant
* [The spread of knowledge in a large game world](https://blog.journeyman.cc/2008/04/the-spread-of-knowledge-in-large-game.html) (2008) discusses what individual non-player characters know, and how to model dynamic updates to their knowledge;
* [The spread of knowledge in a large game world](The-spread-of-knowledge-in-a-large-game-world.html) (2008) discusses what individual non-player characters know, and how to model dynamic updates to their knowledge;
* [Settling a game world](https://blog.journeyman.cc/2009/12/settling-game-world.html) (2009) gives rough outline of ideas about creating the environment, including modelling things like soil fertility, local building materials, and consequently local architecture;
* [Tessellated multi-layer height map](https://blog.journeyman.cc/2013/07/tessellated-multi-layer-height-map.html) (2013) gives ideas for how a designed geography for a very large world could be stored relatively economically;
* [Genetic Buildings](https://blog.journeyman.cc/2013/07/genetic-buildings.html) (2013) sketches algorithms which would allow procedurally-generated buildings to be site-appropriate, broadly variable and reproducable;
* [Populating a game world](https://blog.journeyman.cc/2013/07/populating-game-world.html) (2013) provides outline algorithms for how a world can be populated, and how organic mixes of trades and crafts can be modelled;
* [Populating a game world](Populating-a-game-world.html) (2013) provides outline algorithms for how a world can be populated, and how organic mixes of trades and crafts can be modelled;
* [Modelling the change from rural to urban](https://blog.journeyman.cc/2013/07/modelling-change-from-rural-to-urban.html) (2013) describes the idea of procedurally modelling settlements, but it is grid-based and not particularly satisfactory and has largely been superceded in my thinking;
* [Of pigeons, and long distance messaging in a game world]() (2013) builds on ideas about flows of information;
* [Of pigeons, and long distance messaging in a game world](https://blog.journeyman.cc/2013/10/of-pigeons-and-long-distance-messaging.html) (2013) builds on ideas about flows of information;
* [Modelling rural to urban, take two](https://blog.journeyman.cc/2013/10/modelling-rural-to-urban-take-two.html) (2013) revisited the idea of modelling organic settlement structures, trying to find algorithms which would naturally produce more persuasive settlement models, including further ideas on the procedural generation of buildings;
* [More on modelling rivers](https://blog.journeyman.cc/2014/09/more-on-modelling-rivers.html) (2014) talks about modelling hydrology, with implications for soil fertility;
* [Modelling settlement with cellular automata](https://blog.journeyman.cc/2014/08/modelling-settlement-with-cellular.html) (2014) talks about successful implementation of algorithms to model vegetative environment, human settlement and the impact of human settlement on the environment;
* [Voice acting considered harmful](https://blog.journeyman.cc/2015/02/voice-acting-considered-harmful.html) (2015) outlines the ideas behind full speech interaction with non-player characters, and modelling what those non-player characters should be able to speak about;
* [Baking the world](https://blog.journeyman.cc/2019/05/baking-world.html) (2019) an outline of the overall process of creating a world.
* [Baking the world](Baking-the-world.html) (2019) an outline of the overall process of creating a world.
## Organic and emergent game-play
@ -183,8 +183,8 @@ easy:
So each agent is assigned - by the dreaded random number generator - one top
level goal when they are instantiated. I don't think it's necessary to model
change of top level goals, although of course that does happen in real life;
however, although each agent has one top level goal, they will have lower l
evel 'stretch goals' also taken from this list: so at each decision point in
however, although each agent has one top level goal, they will have lower
level 'stretch goals' also taken from this list: so at each decision point in
an agent's planning loop, if base level needs are satisfied and progress on
the top level goal is blocked, actions should be chosen which progress one
of the lower goals. Indeed, it's possible that all agents could have all
@ -379,4 +379,4 @@ Each game day, every habitual traveller within the 'local' gossip bubble
exchanges some items of gossip with the nearest innkeeper to their current
location. In the second and third gossip bubbles, it's probably only more
favoured gossip agents who do this. See
[The spread of knowledge in a large game world](https://blog.journeyman.cc/2008/04/the-spread-of-knowledge-in-large-game.html)
[The spread of knowledge in a large game world](The-spread-of-knowledge-in-a-large-game-world.html)

View file

@ -2,7 +2,7 @@
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.
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](the-great-game.gossip.gossip.html) 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?