the-great-game/docs/codox/the-great-game.gossip.news-items.html
2021-02-19 23:44:46 +00:00

19 lines
18 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>the-great-game.gossip.news-items documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">The-great-game</span> <span class="project-version">0.1.1</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Baking-the-world.html"><div class="inner"><span>Baking the world</span></div></a></li><li class="depth-1 "><a href="Game_Play.html"><div class="inner"><span>Game Play</span></div></a></li><li class="depth-1 "><a href="Gossip_scripted_plot_and_Johnny_Silverhand.html"><div class="inner"><span>Gossip, scripted plot, and Johnny Silverhand</span></div></a></li><li class="depth-1 "><a href="Organic_Quests.html"><div class="inner"><span>Organic Quests</span></div></a></li><li class="depth-1 "><a href="Populating-a-game-world.html"><div class="inner"><span>Populating a game world</span></div></a></li><li class="depth-1 "><a href="Settling-a-game-world.html"><div class="inner"><span>Settling a game world</span></div></a></li><li class="depth-1 "><a href="Simulation-layers.html"><div class="inner"><span>Simulation layers</span></div></a></li><li class="depth-1 "><a href="The-spread-of-knowledge-in-a-large-game-world.html"><div class="inner"><span>The spread of knowledge in a large game world</span></div></a></li><li class="depth-1 "><a href="Uncanny_dialogue.html"><div class="inner"><span>The Uncanny Valley, and dynamically generated dialogue</span></div></a></li><li class="depth-1 "><a href="Voice-acting-considered-harmful.html"><div class="inner"><span>Voice acting considered harmful</span></div></a></li><li class="depth-1 "><a href="economy.html"><div class="inner"><span>Game world economy</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to the-great-game</span></div></a></li><li class="depth-1 "><a href="modelling_trading_cost_and_risk.html"><div class="inner"><span>Modelling trading cost and risk</span></div></a></li><li class="depth-1 "><a href="naming-of-characters.html"><div class="inner"><span>Naming of Characters</span></div></a></li><li class="depth-1 "><a href="on-dying.html"><div class="inner"><span>On Dying</span></div></a></li><li class="depth-1 "><a href="sandbox.html"><div class="inner"><span>Sandbox</span></div></a></li><li class="depth-1 "><a href="sexual-dimorphism.html"><div class="inner"><span>Sexual dimorphism</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>the-great-game</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>agent</span></div></div></li><li class="depth-3"><a href="the-great-game.agent.agent.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>agent</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>gossip</span></div></div></li><li class="depth-3 branch"><a href="the-great-game.gossip.gossip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gossip</span></div></a></li><li class="depth-3 current"><a href="the-great-game.gossip.news-items.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>news-items</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>merchants</span></div></div></li><li class="depth-3 branch"><a href="the-great-game.merchants.markets.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>markets</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.merchants.merchant-utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>merchant-utils</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.merchants.merchants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>merchants</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.merchants.planning.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>planning</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>strategies</span></div></div></li><li class="depth-4"><a href="the-great-game.merchants.strategies.simple.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simple</span></div></a></li><li class="depth-2 branch"><a href="the-great-game.time.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-2 branch"><a href="the-great-game.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>world</span></div></div></li><li class="depth-3 branch"><a href="the-great-game.world.location.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>location</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.world.routes.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>routes</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.world.run.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>run</span></div></a></li><li class="depth-3"><a href="the-great-game.world.world.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>world</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-degrade-character"><div class="inner"><span>degrade-character</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-degrade-location"><div class="inner"><span>degrade-location</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-infer"><div class="inner"><span>infer</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-interest-in-character"><div class="inner"><span>interest-in-character</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-interest-in-location"><div class="inner"><span>interest-in-location</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-interesting-character.3F"><div class="inner"><span>interesting-character?</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-interesting-item.3F"><div class="inner"><span>interesting-item?</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-interesting-location.3F"><div class="inner"><span>interesting-location?</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-interesting-object.3F"><div class="inner"><span>interesting-object?</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-interesting-topic.3F"><div class="inner"><span>interesting-topic?</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-learn-news-item"><div class="inner"><span>learn-news-item</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-make-all-inferences"><div class="inner"><span>make-all-inferences</span></div></a></li><li class="depth-1"><a href="the-great-game.gossip.news-items.html#var-news-topics"><div class="inner"><span>news-topics</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">the-great-game.gossip.news-items</h1><div class="doc"><div class="markdown"><p>Categories of news events interesting to gossip agents</p></div></div><div class="public anchor" id="var-degrade-character"><h3>degrade-character</h3><div class="usage"><code>(degrade-character gossip character)</code></div><div class="doc"><div class="markdown"><p>Return a character specification like this <code>character</code>, but comprising only those properties this <code>gossip</code> is interested in.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L198">view source</a></div></div><div class="public anchor" id="var-degrade-location"><h3>degrade-location</h3><div class="usage"><code>(degrade-location gossip location)</code></div><div class="doc"><div class="markdown"><p>Return a location specification like this <code>location</code>, but comprising only those elements this <code>gossip</code> is interested in. If none, return <code>nil</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L205">view source</a></div></div><div class="public anchor" id="var-infer"><h3>infer</h3><div class="usage"><code>(infer item rule)</code></div><div class="doc"><div class="markdown"><p>Infer a new knowledge item from this <code>item</code>, following this <code>rule</code></p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L173">view source</a></div></div><div class="public anchor" id="var-interest-in-character"><h3>interest-in-character</h3><div class="usage"><code>(interest-in-character gossip character)</code></div><div class="doc"><div class="markdown"><p>Integer representation of how interesting this <code>character</code> is to this <code>gossip</code>. <em>TODO:</em> this assumes that characters are passed as keywords, but, as documented above, they probably have to be maps, to allow for degradation.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L104">view source</a></div></div><div class="public anchor" id="var-interest-in-location"><h3>interest-in-location</h3><div class="usage"><code>(interest-in-location gossip location)</code></div><div class="doc"><div class="markdown"><p>Integer representation of how interesting this <code>location</code> is to this <code>gossip</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L121">view source</a></div></div><div class="public anchor" id="var-interesting-character.3F"><h3>interesting-character?</h3><div class="usage"><code>(interesting-character? gossip character)</code></div><div class="doc"><div class="markdown"><p>Boolean representation of whether this <code>character</code> is interesting to this <code>gossip</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L115">view source</a></div></div><div class="public anchor" id="var-interesting-item.3F"><h3>interesting-item?</h3><div class="usage"><code>(interesting-item? gossip item)</code></div><div class="doc"><div class="markdown"><p>True if anything about this news <code>item</code> is interesting to this <code>gossip</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L163">view source</a></div></div><div class="public anchor" id="var-interesting-location.3F"><h3>interesting-location?</h3><div class="usage"><code>(interesting-location? gossip item)</code></div><div class="doc"><div class="markdown"><p>True if the location of this news <code>item</code> is interesting to this <code>gossip</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L148">view source</a></div></div><div class="public anchor" id="var-interesting-object.3F"><h3>interesting-object?</h3><div class="usage"><code>(interesting-object? gossip object)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L153">view source</a></div></div><div class="public anchor" id="var-interesting-topic.3F"><h3>interesting-topic?</h3><div class="usage"><code>(interesting-topic? gossip topic)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L158">view source</a></div></div><div class="public anchor" id="var-learn-news-item"><h3>learn-news-item</h3><div class="usage"><code>(learn-news-item gossip item)</code><code>(learn-news-item gossip item follow-inferences?)</code></div><div class="doc"><div class="markdown"><p>Return a gossip like this <code>gossip</code>, which has learned this news <code>item</code> if it is of interest to them.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L217">view source</a></div></div><div class="public anchor" id="var-make-all-inferences"><h3>make-all-inferences</h3><div class="usage"><code>(make-all-inferences item)</code></div><div class="doc"><div class="markdown"><p>Return a list of knowledge entries that can be inferred from this news <code>item</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L187">view source</a></div></div><div class="public anchor" id="var-news-topics"><h3>news-topics</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Topics of interest to gossip agents. Topics are keyed in this map by their <code>verbs</code>. The <code>keys</code> associated with each topic are the extra pieces of information required to give context to a gossip item. Generally:</p>
<ul>
<li><code>actor</code> is the id of the character who it is reported performed the action;</li>
<li><code>other</code> is the id of the character on whom it is reported the action was performed;</li>
<li><code>location</code> is the place at which the action was performed;</li>
<li><code>object</code> is an object (or possibly list of objects?) relevant to the action;</li>
<li><code>price</code> is special to buy/sell, but of significant interest to merchants.</li>
</ul>
<h4><a href="#notes-" name="notes-"></a>Notes:</h4>
<h5><a href="#characters-" name="characters-"></a>Characters:</h5>
<p><em>TODO</em> but note that at most all the receiver can learn about a character from a news item is what the giver knows about that character, degraded by what the receiver finds interesting about them. If we just pass the id here, then either the receiver knows everything in the database about the character, or else the receiver knows nothing at all about the character. Neither is desirable. Further thought needed.</p>
<p>By implication, the character values passed should include <em>all</em> the information the giver knows about the character; that can then be degraded as the receiver stores only that segment which the receiver finds interesting.</p>
<h5><a href="#locations-" name="locations-"></a>Locations:</h5>
<p>A location value is a list comprising at most the x/y coordinate location and the ids of the settlement and region (possibly hierarchically) that contain the location. If the x/y is not local to the home of the receiving agent, they wont remember it and wont pass it on; if any of the ids are not interesting So location information will degrade progressively as the item is passed along.</p>
<p>It is assumed that the <code>:home</code> of a character is a location in this sense.</p>
<h5><a href="#inferences-" name="inferences-"></a>Inferences:</h5>
<p>If an agent learns that Adam has married Betty, they can infer that Betty has married Adam; if they learn that Charles killed Dorothy, that Dorothy has died. Im not convinced that my representation of inferences here is ideal.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/gossip/news_items.clj#L19">view source</a></div></div></div></body></html>