<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">5000 Characters at Video Frame Rate using Declarative Programming</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Samuel</forename><surname>Hill</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Northwestern University</orgName>
								<address>
									<addrLine>2233 Tech Drive</addrLine>
									<postCode>60208</postCode>
									<settlement>Evanston</settlement>
									<region>IL</region>
									<country key="US">USA</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Ian</forename><surname>Horswill</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Northwestern University</orgName>
								<address>
									<addrLine>2233 Tech Drive</addrLine>
									<postCode>60208</postCode>
									<settlement>Evanston</settlement>
									<region>IL</region>
									<country key="US">USA</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">5000 Characters at Video Frame Rate using Declarative Programming</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">62EB4DCA0004772F945709FEE5722943</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2025-04-23T18:29+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Declarative programming</term>
					<term>Logic programming</term>
					<term>Needs-based AI</term>
					<term>crowd simulations 1</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Video games have historically been limited in the number of characters under AI control. This is all the more true for games that use declarative systems which are generally used for turn-based or otherwise non-real-time games. While a declarative system can obviously be used for a real-time simulation, we wanted to test the limits of how far it can be scaled for large numbers of characters. This paper shows how 5000 characters can run simultaneously and in real-time with 60fps performance on a modern laptop using a declarative logic programming language.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Performance considerations have traditionally restricted the number of simultaneous NPCs, particularly when those characters are driven by symbolic rules or other declarative methods. Many systems that do support this kind of character AI are also turn-based rather than real-time. In this paper, we show that 5000 The Sims-style characters can be run simultaneously on a modern laptop using a version of logic programming.</p><p>Although Sims-style 'needs-based AI' is relatively simple, and the rendering of the characters in our demo is extremely simple (particle-like dots on the screen), this still demonstrates that symbolic, declarative techniques can be pushed well beyond what would have been though possible. In this paper, we will discuss the system, and the techniques used to make it so efficient.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Related Work</head><p>Many AI-based games have used symbolic declarative systems -logic, symbolic rules, or some kind of rule engine -for social reasoning and character control. Façade <ref type="bibr" target="#b0">[1]</ref> used a reactive planner, ABL <ref type="bibr" target="#b1">[2]</ref>, that incorporated a forward-chaining production system. Prom Week <ref type="bibr" target="#b2">[3]</ref> also used a forward-chaining production system, Comme Il Faut <ref type="bibr" target="#b3">[4]</ref>. CiF's successor the Ensemble Engine <ref type="bibr" target="#b4">[5]</ref> is similarly a forwardchaining production system. The Sims 3 <ref type="bibr" target="#b5">[6]</ref> used a rule system to script the interactions between situations, personality traits, and actions available to a given character <ref type="bibr" target="#b6">[7]</ref>. MKULTRA <ref type="bibr" target="#b7">[8]</ref> and City of Gangsters <ref type="bibr">[9]</ref> both used logic programming to implement social reasoning <ref type="bibr" target="#b8">[10]</ref>. F.E.A.R. makes use of a planner, GOAP, that allows for declarative definitions of various AIs in the GDBEdit database tool <ref type="bibr" target="#b9">[11]</ref>.</p><p>One of the earliest and most influential symbolic systems for games is the Inform 7 language <ref type="bibr" target="#b10">[12]</ref>, <ref type="bibr" target="#b11">[13]</ref> that allows designers to build interactive narrative systems using declarative statements. The Versu simulationist narrative system <ref type="bibr" target="#b12">[14]</ref>, <ref type="bibr" target="#b13">[15]</ref> used a custom logic programming language, Praxis, based on an exotic modal logic called eremic logic (aka exclusion logic) <ref type="bibr" target="#b14">[16]</ref>. The Lume system <ref type="bibr" target="#b15">[17]</ref> made extensive use of Prolog's definite clause grammars <ref type="bibr" target="#b16">[18]</ref>, <ref type="bibr" target="#b17">[19]</ref> for text generation. Lapeyrade has also used Prolog for better character decision making <ref type="bibr" target="#b18">[20]</ref>.</p><p>All these games and systems use declarative programming for either some component of character control and/or social reasoning. Some are turn-based games like in the Versu platform, others are batch like jobs used in Townlikes (that still need to run fast but not at any particular frame rate), and others are realtime systems like with GOAP in F.E.A.R.. Even when used for real-time character control the number of NPCs is usually relatively low and the portion of the game logic that is declarative are the relations between possible actions and the world state. The code for how a Goal executes is still usually written in an imperative manner <ref type="bibr" target="#b9">[11]</ref>.</p><p>There are also entire games that have been built using declarative languages, such as those built with the video game description language -VGDL <ref type="bibr" target="#b19">[21]</ref>. Currently this technique is used to generate 2D tile arcade style games with the help of ASP and evolutionary search <ref type="bibr" target="#b20">[22]</ref>, <ref type="bibr" target="#b21">[23]</ref>. These games are playable by a human and are fully declarativeeverything from character controls to game logic to the tilemap itself are declared in text files that are used to generate a game. The purpose of these games is largely to allow for testing of general video game playing (GVGP) algorithms on several different games <ref type="bibr" target="#b22">[24]</ref>.</p><p>In large part because of the expense of AI simulation, games involving large-scale character simulation are relatively rare. The best known is Dwarf Fortress <ref type="bibr" target="#b23">[25]</ref>, which supports real-time simulation of small hundreds of characters. Achieving this level of performance requires implementation in C++ and significant programmer effort to optimize cache locality and minimize pointer chasing. RimWorld is a very similar game that also involves social simulation for the purpose of storytelling <ref type="bibr" target="#b24">[26]</ref>. Caves Of Qud is a game that is more like adventure mode in DF and, similarly, features hundreds of characters that all have various social relations and need to choose what action to take each tick <ref type="bibr" target="#b25">[27]</ref>. Unlike DF Fortress mode and RimWorld, this roguelike experience is turn based and as such doesn't need to run at a particular frame rate. While all these games feature large numbers of characters acting in a world, none use declarative systems for the control of these NPCs.</p><p>Some large-scale crowd simulation exist for use in film and other rendered media forms <ref type="bibr" target="#b26">[28]</ref>, <ref type="bibr" target="#b27">[29]</ref>. Some of these tools even allow the behaviors of the agents to be stated in sentence form for specific decision nodes <ref type="bibr" target="#b28">[30]</ref>. These tools target rendered scenes for film and television and as such do not need to run in real-time.</p><p>Some crowd simulation techniques have been used to study crowd dynamics and the creation of autonomous agents for visualization <ref type="bibr" target="#b29">[31]</ref>, <ref type="bibr" target="#b30">[32]</ref>. Shao have claimed real-time performance at 30fps when animating up to 1400 characters moving and pathfinding around a 3D scene on 2007 hardware <ref type="bibr" target="#b29">[31]</ref>. This was done with over 50,000 lines of C++ and uses a simple action selection method reminiscent of needs-based AI.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Needs-based AI</head><p>Needs-based AI is a famous technique for controlling characters in video games that was created for The Sims <ref type="bibr" target="#b31">[33]</ref>, <ref type="bibr" target="#b32">[34]</ref>, and has been used in other games like Roller Coaster Kingdom and an RPG for Lord Of the Rings <ref type="bibr" target="#b32">[34]</ref>.</p><p>Needs-based AI attempts to fulfill various needs for NPCs by searching over the actions of each object available to them (i.e. advertisements) and weighting the cost of completing the action against each character's needs with some scoring function <ref type="bibr" target="#b32">[34]</ref>. Each character goes about completing actions that have been selected/assigned to them, potentially getting rewarded for the various tasks. When no more actions remain in the queue of selected actions the NPC searches for all the advertisements on all the objects around them then scores each action based on their needs and selects the best scoring advertisement. The equation for selecting the best scoring advertisement is 𝑎𝑟𝑔𝑚𝑎𝑥(𝑆) where 𝑆 is the set of all scored advertisements for a given character. The complexity of scoring all advertisements is 𝑂(𝑁𝐿𝑀), where 𝑁 is the number of people, 𝐿 is the objects nearby, and 𝑀 is the advertisements at each location. Once you have scored all advertisements for all characters, you can run the argmax equation for each character. Since argmax is operating on the set of all advertisements for each person, the complexity of selecting an action from the scored set is 𝑂(𝑁𝐿𝑀), where 𝑁 is the number of people, 𝐿 is the objects nearby, and 𝑀 is the advertisements. Given that these two steps are each of the same complexity, and that the two iterations are sequential, the total complexity of action selection is 𝑂(𝑁𝐿𝑀).</p><p>The selected advertised action sequence is then added to the queue of actions to be completed. Needsbased AI has always had the ability to sequence actions, a technique called action chaining <ref type="bibr" target="#b32">[34]</ref>, but in The Sims 4 the developers wanted to be able to have more interesting action sequences. To accomplish this the developers allowed the system to simultaneously dispatch multiple actions from the queue when those actions would not interfere with one another <ref type="bibr" target="#b33">[35]</ref>.</p><p>The Sims 3 had a goal of creating a larger varied living world, and to do this while remaining playable several optimizations were employed <ref type="bibr" target="#b34">[36]</ref>. Some execution optimizations such as hierarchical planning and commodity-interaction maps as well as some level of detail (LoD) optimizations such as auto-satisfy curves and story progression <ref type="bibr" target="#b34">[36]</ref>. Hierarchical planning takes the usually 𝑂(𝑁𝐿𝑀) approach of searching for every person (𝑁), for every location (𝐿), and then for every advertised action (𝑀), and makes it 𝑂(𝑁 + 𝐿 + 𝑀) by instead selecting each step one at a time. Commodity-interaction maps are essentially dictionaries of needs and the actions that satisfy those needs, and they are used to trade off compute time searching over all advertisements on all objects to see if they satisfy a sim's needs with storage cost. The LoD optimizations tick the actions of sims not in the current focused level when they come into focus (auto-satisfy), and tick certain subsystems like the wants of the town itself at a lower rate (story progression). As a result, although the simulation notionally supports hundreds of characters, the vast majority of them are effectively idle at any given time.</p><p>As well, although The Sims 3 has many more possible motives (needs) than the 8 used in previous versions, any individual character has a small number of those possible motives.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Scoring functions</head><p>The scoring function that we use here is the most sophisticated function listed in Zubeks description of needs-based AI, an attenuated need-delta scoring function that is additionally attenuated based on distance <ref type="bibr" target="#b32">[34]</ref>. One difference in our version is that each action can only satisfy one need. In the version of action performance outlined by Zubek, some actions can be sequences, and this can potentially allow for multiple needs to be fulfilled by an advertisement. As such, the algorithm for calculating an advertised action score must sum the attenuated scoring across all needs. Instead of summing across all needs, with each action only satisfying one need, we can simplify the attenuated need-delta scoring with distance attenuation to:</p><formula xml:id="formula_0">𝑠𝑐𝑜𝑟𝑒 = 𝐷(𝐴 𝑛𝑒𝑒𝑑 (𝜈 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 ) − 𝐴 𝑛𝑒𝑒𝑑 (𝜈 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 + 𝛿))</formula><p>where 𝜈 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 is the current need value of a particular need type, 𝛿 advertised need delta, 𝐴 𝑛𝑒𝑒𝑑 is an attenuation function, and 𝐷 is the distance attenuation function. 𝐴 𝑛𝑒𝑒𝑑 (𝑥) = )</p><p>to tune down the degree to which NPCs attenuate distance. The value 2870 was not chosen at random, it relates to the size of the map that the characters move on and effectively scales 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 2 to be between 1 and 30 (as opposed to a max of 82369). One more simplification in the current demo is that all locations only advertise a single action. In effect, a location has a type that correlates to a need. As such, the complexity of this scoring algorithm can be given as 𝑂(𝑁𝐿), where 𝑁 is the number of NPCs that need to select actions and 𝐿 is the number of locations to search over.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Real-time logic programming</head><p>To test the scaling limits of declarative symbolic logical methods for real-time NPC control, we built a state-fair simulator, as one might find in a tycoon game, using a logic-programming implementation of needs-based AI. NPC's wander through the state fair eating, drinking, seeking entertainments, and so on. The simulation consists of a map with 367 locations, onto which we spawn a few thousand NPCs. Each character has 6 motivations (hunger, bathroom, games, amusement, music, and shopping) that influence their action selection.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.">Needs-based AI in logic programming</head><p>The logic for the core steps of scoring all available actions and then selecting the best action for each </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.">Implementation optimizations</head><p>The performance of the system is dependent on several optimizations. Many of these have to do with the specific programming language implementation: strong typing, bottom-up execution, parallel execution, native code compilation. The details of the language implementation are outside the scope of this paper but see <ref type="bibr" target="#b35">[37]</ref>, <ref type="bibr" target="#b36">[38]</ref> for more information.</p><p>Another important optimization might be called implicit need decay. Normally, a needs-based AI system would update each need state of each character on every tick. For our system, this would be prohibitively expensive. Instead, we store timestamped need values; a need value is represented as a tuple of (𝑣, 𝑡, 𝜌) stating that the need had value 𝜈 at time 𝑡, and was decaying at rate 𝜌. We can then compute the current need value on demand as:</p><formula xml:id="formula_1">𝜈 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 = max(𝜈 − (𝑡 − 𝑡 𝑛𝑜𝑤 ) * 𝜌)</formula><p>with 𝑡 𝑛𝑜𝑤 being the current time. Since these values are read infrequently but would otherwise be updated frequently, this is much more efficient. As is recommended by Zubek, decay rates for a given need vary slightly from character to character to give them slightly different "personalities". These decay rates are chosen randomly (Appendix A, Code Fragment 3).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3.">Action States</head><p>For characters to perform a selected action they must move to the location of the selected action and then take some steps to complete the action before the need is satisfied. While we could allow for completion of actions instantaneously, to be more in line with The Sims implementation -as specified by Zubek -we instead have some action performance before a need is satisfied.</p><p>When an action is initiated, the system tells the unity code to start moving the character, and then marks the character as being in progress towards that location. When the character arrives at the location they are marked as no longer moving towards their destination. When the action is completed, unity informs the system, and the system updates the need states, and generates a new next action (Appendix A, Code <ref type="bibr">Fragment 6,</ref><ref type="bibr" target="#b6">7,</ref><ref type="bibr" target="#b7">8,</ref><ref type="bibr" target="#b9">11)</ref>. In place of the animations that would normally be running when performing an action, we simulate an animation running by starting a timer that indicates the selected action is being done (Appendix A, Code Fragment 9).</p><p>Unlike in The Sims all actions in this simulation are individual, there is no chaining of actions nor are there any concurrent interactions. This simplification is what allows us to use a timer for each person taking an action, when the timer is running the "animation" is playing and when the timer completes the character has completed the action and finished its animation. While we do not have proper animations for each sim, when on a timer for an action the sim is moving randomly around the location that they have selected an action at.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4.">Destinations &amp; Unity Interface</head><p>For control of character movements, we have a simple interface between the action selection simulation and the Unity code that performs movements. The Simulog code provides a table of people and the destination they are moving to (Appendix A, Code Fragment 7) that the Unity code iterates over each tick to adjust NPC positions. The Unity code in turn provides a function that we can call to ask if someone has arrived at their destination. With this simple interface of action selection assigning destinations to the Unity code and Unity only needing to report back when someone has arrived at the destination, we are able to change out the underlying movement implementation without needing to do any modifications to the action selection algorithm. Currently, the movement is all simple vector addition moving sims at a set speed straight towards their destination.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Performance</head><p>With 5000 NPCs running this simulation on an Apple M3 Pro we are able to 60fps or better for 95% of frames when running some performance tests. Our average inner-frame time was 13.87ms with a standard deviation of 2.077ms. Figure <ref type="figure" target="#fig_3">3</ref> shows our performance curve once stable (from 12500 to 25000 ticks) which is somewhat bell curve shaped with a longer tail to the right. Most of the tail to the right is likely garbage collection or some other Unity process as that performance tail is not present in Figure <ref type="figure" target="#fig_4">4</ref> when we show the performance curve for just the rule execution times.   The graph in Figure <ref type="figure" target="#fig_2">2</ref> shows the progression of the simulation over a 25,000-tick run time. The first 5000 ticks spawn one person every tick causing the slow rise in compute time for both the action selection mechanism and the inner-frame updates. For the next 7500 ticks characters begin to arrive at their first destination and need to select their next action, creating a tiered slope in the action selection performance as various numbers of characters need to select an action. From 12500 ticks on we have a steady state where performance is consistent and linear with NPCs now moving around and selecting actions at a rate of 13.7 actions selected on average per tick for our sample with a σ of 3.8 actions.</p><p>The cost of moving 5000 NPCs and rendering the scene (amongst other functions that Unity runs) is the difference between the action selection rule execution time and the inner-frame time. As can be seen in Figure <ref type="figure" target="#fig_1">1</ref>, this difference (looking from 5000 ticks to 9000 ticks where action selection has not yet taken off) is about 7ms. There is also a baseline cost to running the rest of the declarative simulation when not performing action selection. As can be seen in Figures <ref type="figure" target="#fig_4">2 and 4</ref>, the cost of running our declarative simulation on 5000 characters without any action selection takes about 1ms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Figure 5: Performance of Action Selection</head><p>After these baseline costs, the variation in performance largely comes down to the number of characters selecting actions on any given tick. The performance cost for one NPC selecting an action averages to just under 0.3ms. This gap between each number of agents selecting is clearly visible in Figure <ref type="figure" target="#fig_2">2</ref> and 5 with both the color mapped data points and green lines indicating the moving average for each tier. The same gaps are not visible in the inter-frame time data (grey dots in Figure <ref type="figure" target="#fig_2">2</ref>), although there is clearly a correlation between the range of performance for rule execution and for total interframe time.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1.">Pushing character counts</head><p>The performance shown above is only possible when we first compile our rules down to native C# code, the process for which is described in <ref type="bibr" target="#b35">[37]</ref>, <ref type="bibr" target="#b36">[38]</ref>, and then we run our compiled code in parallel. The type of parallelism employed is per predicate, not per sim, utilizing the dependency graph for all predicates to spin up tasks that run the compiled rules for a given predicate only when its dependencies have finished. Without these optimizations the maximum character count at nearly the same performance is 2000 NPCs.</p><p>One optimization that could be employed to further stabilize performance (and potentially allow for more NPCs) is to throttle the number of characters that are selecting actions on a given tick. With a limit on the number of characters selecting actions that is slightly higher than the un-limited average number selecting you could effectively cap the cost of doing action selection while still eventually performing the same sets of needs-based calculations. This technique was not employed in this demo but a commercial system that cares more about never dropping below 60fps may want to implement such a throttle.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: State Fair Sim running in Unity</figDesc><graphic coords="3,85.30,85.05,424.05,237.60" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: Performance of the State Fair Sim</figDesc><graphic coords="5,83.30,85.05,427.62,272.84" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 3 :</head><label>3</label><figDesc>Figure 3: State Fair Sim Inter-Frame Intervals</figDesc><graphic coords="6,85.05,251.91,205.35,154.00" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Figure 4 :</head><label>4</label><figDesc>Figure 4: Action Selection Rule Execution Times</figDesc></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="11" xml:id="foot_0">11th Experimental Artificial Intelligence in Games Workshop, November 19, 2024, Lexington, Kentucky, USA.</note>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">Conclusion</head><p>AI character control based on declarative programming can be surprisingly performant. Through a combination of compilation, parallel evaluation, and careful optimization, thousands of characters can be run at video frame rate. Although this demonstration involves simple needs-based AI, we intend to investigate more complicated techniques in the future.</p></div>
			</div>


			<div type="availability">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Code Fragment 1 and 2. For a discussion of the programming language used, see <ref type="bibr" target="#b35">[37]</ref>, <ref type="bibr" target="#b36">[38]</ref>, but the following fragments can be explained thusly:</p><p>Code Fragment 1 defines a predicate that is true when a given person performing a given advertised action at a given location has a given score. It states that it has that score when the location advertises that action, it fulfills some need, and score is the result of distance-based scoring, above, along with some noise to add a small amount of randomness to the action selection:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Code Fragment 1 Action Scoring</head><p>Given this, Code Fragment 2 defines a predicate stating a given action/location pair is best for a given character (note that this is essentially the same as the argmax equation, just written in logic):</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Code Fragment 2 Action Selection</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Code</head><p>Fragment 1 NPCs (people) and their Needs Code Fragment 2 NPC start and end conditions Code Fragment 3 Need assignments Code Fragment 4 Locations and their Advertisements Code Fragment 5 Action satisfies need table Code Fragment 6 Person action state table Code Fragment 7 Destinations and Arrivals Code Fragment 8 Arrival state update Code Fragment 9 Action timer Code Fragment 10 Ready to select action Code Fragment 11 Action assignment Code Fragment 12 Action completion and reward</p></div>
			</div>

			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Code Appendix</head><p>Other than the two code fragments inside the body of this document, the remain fragments in this appendix contain the entirety of the Simulation code written in TED/Simulog. </p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title/>
		<author>
			<persName><forename type="first">M</forename><surname>Mateas</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Stern</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Façade</title>
		<imprint>
			<date type="published" when="2005">2005</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">A behavior language for story-based believable agents</title>
		<author>
			<persName><forename type="first">M</forename><surname>Mateas</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Stern</surname></persName>
		</author>
		<idno type="DOI">10.1109/MIS.2002.1024751</idno>
	</analytic>
	<monogr>
		<title level="j">IEEE Intell. Syst</title>
		<imprint>
			<biblScope unit="volume">17</biblScope>
			<biblScope unit="issue">4</biblScope>
			<biblScope unit="page" from="39" to="47" />
			<date type="published" when="2002-07">Jul. 2002</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Prom week</title>
		<author>
			<persName><forename type="first">J</forename><surname>Mccoy</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Treanor</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Samuel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">A</forename><surname>Reed</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Wardrip-Fruin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Mateas</surname></persName>
		</author>
		<idno type="DOI">10.1145/2282338.2282384</idno>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the International Conference on the Foundations of Digital Games, in FDG &apos;12</title>
				<meeting>the International Conference on the Foundations of Digital Games, in FDG &apos;12<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>Association for Computing Machinery</publisher>
			<date type="published" when="2012-05">May 2012</date>
			<biblScope unit="page" from="235" to="237" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Comme il Faut: A System for Authoring Playable Social Models</title>
		<author>
			<persName><forename type="first">J</forename><surname>Mccoy</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Treanor</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Samuel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Wardrip-Fruin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Mateas</surname></persName>
		</author>
		<idno type="DOI">10.1609/aiide.v7i1.12454</idno>
	</analytic>
	<monogr>
		<title level="m">Proc. AAAI Conf. Artif. Intell. Interact. Digit. Entertain</title>
				<meeting>AAAI Conf. Artif. Intell. Interact. Digit. Entertain</meeting>
		<imprint>
			<date type="published" when="2011-10">Oct. 2011</date>
			<biblScope unit="volume">7</biblScope>
			<biblScope unit="page" from="158" to="163" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<author>
			<persName><forename type="first">B</forename><surname>Samuel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">A</forename><surname>Reed</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Maddaloni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Mateas</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Wardrip-Fruin</surname></persName>
		</author>
		<title level="m">The Ensemble Engine: Next-Generation Social Physics</title>
				<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title/>
	</analytic>
	<monogr>
		<title level="j">The Sims</title>
		<imprint>
			<biblScope unit="volume">3</biblScope>
			<date type="published" when="2009">2009</date>
		</imprint>
	</monogr>
	<note>Maxis</note>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">AI challenges in Sims 3</title>
		<author>
			<persName><forename type="first">R</forename><surname>Evans</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Artif. Intell. Interact. Digit. Entertain</title>
				<imprint>
			<date type="published" when="2009">2009</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Postmortem: MKULTRA, An Experimental AI-Based Game</title>
		<author>
			<persName><forename type="first">I</forename><surname>Horswill</surname></persName>
		</author>
		<idno type="DOI">10.1609/aiide.v14i1.13027</idno>
	</analytic>
	<monogr>
		<title level="m">Proc. AAAI Conf. Artif. Intell. Interact. Digit. Entertain</title>
				<meeting>AAAI Conf. Artif. Intell. Interact. Digit. Entertain</meeting>
		<imprint>
			<date type="published" when="2018-09">Sep. 2018</date>
			<biblScope unit="volume">14</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Social Modeling via Logic Programming in City of Gangsters</title>
		<author>
			<persName><forename type="first">R</forename><surname>Zubek</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Horswill</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Robison</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Viglione</surname></persName>
		</author>
		<idno type="DOI">10.1609/aiide.v17i1.18912</idno>
	</analytic>
	<monogr>
		<title level="m">Proc. AAAI Conf. Artif. Intell. Interact. Digit. Entertain</title>
				<meeting>AAAI Conf. Artif. Intell. Interact. Digit. Entertain</meeting>
		<imprint>
			<date type="published" when="2021-10">Oct. 2021</date>
			<biblScope unit="volume">17</biblScope>
			<biblScope unit="page" from="220" to="226" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<author>
			<persName><forename type="first">J</forename><surname>Orkin</surname></persName>
		</author>
		<title level="m">Three States and a Plan: The A</title>
				<imprint>
			<publisher>I. of F.E.A.R</publisher>
			<date type="published" when="2006">2006</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title/>
		<author>
			<persName><forename type="first">G</forename><surname>Nelson</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Inform</title>
		<imprint>
			<biblScope unit="volume">7</biblScope>
			<date type="published" when="2006">2006</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<monogr>
		<author>
			<persName><forename type="first">G</forename><surname>Nelson</surname></persName>
		</author>
		<title level="m">NATURAL LANGUAGE, SEMANTIC ANALYSIS AND INTERACTIVE FICTION</title>
				<imprint>
			<date type="published" when="2006">2006</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Versu-A Simulationist Storytelling System</title>
		<author>
			<persName><forename type="first">R</forename><surname>Evans</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Short</surname></persName>
		</author>
		<idno type="DOI">10.1109/TCIAIG.2013.2287297</idno>
	</analytic>
	<monogr>
		<title level="j">IEEE Trans. Comput. Intell. AI Games</title>
		<imprint>
			<biblScope unit="volume">6</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="113" to="130" />
			<date type="published" when="2014-06">Jun. 2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<monogr>
		<title level="m" type="main">The AI Architecture of Versu</title>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">P</forename><surname>Evans</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Short</surname></persName>
		</author>
		<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<analytic>
		<title level="a" type="main">Introducing Exclusion Logic as a Deontic Logic</title>
		<author>
			<persName><forename type="first">R</forename><surname>Evans</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-3-642-14183-6_14</idno>
	</analytic>
	<monogr>
		<title level="m">Deontic Logic in Computer Science</title>
		<title level="s">Lecture Notes in Computer Science</title>
		<editor>
			<persName><forename type="first">G</forename><surname>Governatori</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">G</forename><surname>Sartor</surname></persName>
		</editor>
		<meeting><address><addrLine>Berlin, Heidelberg; Berlin Heidelberg</addrLine></address></meeting>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2010">2010</date>
			<biblScope unit="volume">6181</biblScope>
			<biblScope unit="page" from="179" to="195" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">Lume: a system for procedural story generation</title>
		<author>
			<persName><forename type="first">S</forename><surname>Mason</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Stagg</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Wardrip-Fruin</surname></persName>
		</author>
		<idno type="DOI">10.1145/3337722.3337759</idno>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 14th International Conference on the Foundations of Digital Games</title>
				<meeting>the 14th International Conference on the Foundations of Digital Games<address><addrLine>San Luis Obispo California USA</addrLine></address></meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2019-08">Aug. 2019</date>
			<biblScope unit="page" from="1" to="9" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<analytic>
		<title level="a" type="main">Definite clause grammars for language analysis-A survey of the formalism and a comparison with augmented transition networks</title>
		<author>
			<persName><forename type="first">F</forename><forename type="middle">C N</forename><surname>Pereira</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">H D</forename><surname>Warren</surname></persName>
		</author>
		<idno type="DOI">10.1016/0004-3702(80)90003-X</idno>
	</analytic>
	<monogr>
		<title level="j">Artif. Intell</title>
		<imprint>
			<biblScope unit="volume">13</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="231" to="278" />
			<date type="published" when="1980-05">May 1980</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b17">
	<monogr>
		<title level="m" type="main">Prolog and Natural-Language Analysis</title>
		<author>
			<persName><forename type="first">F</forename><surname>Pereira</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><forename type="middle">M</forename><surname>Shieber</surname></persName>
		</author>
		<ptr target="https://api.semanticscholar.org/CorpusID:264203475" />
		<imprint>
			<date type="published" when="1987">1987</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b18">
	<analytic>
		<title level="a" type="main">Reasoning with Ontologies for Non-player Character&apos;s Decision-Making in Games</title>
		<author>
			<persName><forename type="first">S</forename><surname>Lapeyrade</surname></persName>
		</author>
		<idno type="DOI">10.1609/aiide.v18i1.21980</idno>
	</analytic>
	<monogr>
		<title level="m">Proc. AAAI Conf. Artif. Intell. Interact. Digit. Entertain</title>
				<meeting>AAAI Conf. Artif. Intell. Interact. Digit. Entertain</meeting>
		<imprint>
			<date type="published" when="2022-10">Oct. 2022</date>
			<biblScope unit="volume">18</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b19">
	<analytic>
		<title level="a" type="main">A video game description language for model-based or interactive learning</title>
		<author>
			<persName><forename type="first">T</forename><surname>Schaul</surname></persName>
		</author>
		<idno type="DOI">10.1109/CIG.2013.6633610</idno>
	</analytic>
	<monogr>
		<title level="m">IEEE Conference on Computational Inteligence in Games (CIG)</title>
				<meeting><address><addrLine>Niagara Falls, ON, Canada</addrLine></address></meeting>
		<imprint>
			<publisher>IEEE</publisher>
			<date type="published" when="2013-08">2013. Aug. 2013</date>
			<biblScope unit="page" from="1" to="8" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b20">
	<analytic>
		<title level="a" type="main">Towards generating arcade game rules with VGDL</title>
		<author>
			<persName><forename type="first">T</forename><forename type="middle">S</forename><surname>Nielsen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><forename type="middle">A B</forename><surname>Barros</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Togelius</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">J</forename><surname>Nelson</surname></persName>
		</author>
		<idno type="DOI">10.1109/CIG.2015.7317941</idno>
	</analytic>
	<monogr>
		<title level="m">IEEE Conference on Computational Intelligence and Games (CIG)</title>
				<meeting><address><addrLine>Tainan</addrLine></address></meeting>
		<imprint>
			<publisher>IEEE</publisher>
			<date type="published" when="2015-08">2015. Aug. 2015</date>
			<biblScope unit="page" from="185" to="192" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b21">
	<analytic>
		<title level="a" type="main">Towards Automated Game Design</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">J</forename><surname>Nelson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Mateas</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-3-540-74782-6_54</idno>
	</analytic>
	<monogr>
		<title level="m">AI*IA 2007: Artificial Intelligence and Human-Oriented Computing</title>
		<title level="s">Lecture Notes in Computer Science</title>
		<editor>
			<persName><forename type="first">R</forename><surname>Basili</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">M</forename><forename type="middle">T</forename><surname>Pazienza</surname></persName>
		</editor>
		<meeting><address><addrLine>Berlin, Heidelberg; Berlin Heidelberg</addrLine></address></meeting>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2007">2007</date>
			<biblScope unit="volume">4733</biblScope>
			<biblScope unit="page" from="626" to="637" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b22">
	<analytic>
		<title level="a" type="main">General Video Game Playing</title>
		<author>
			<persName><forename type="first">J</forename><surname>Levine</surname></persName>
		</author>
		<idno type="DOI">10.4230/DFU.VOL6.12191.77</idno>
	</analytic>
	<monogr>
		<title level="s">Schloss Dagstuhl -Leibniz-Zentrum für Informatik</title>
		<imprint>
			<biblScope unit="issue">7</biblScope>
			<biblScope unit="page">336517</biblScope>
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b23">
	<monogr>
		<author>
			<persName><forename type="first">T</forename><surname>Adams</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Z</forename><surname>Adams</surname></persName>
		</author>
		<title level="m">Slaves to Armok: God of Blood Chapter II: Dwarf Fortress</title>
				<imprint>
			<date type="published" when="2006">2006</date>
		</imprint>
	</monogr>
	<note>Bay 12 Games</note>
</biblStruct>

<biblStruct xml:id="b24">
	<monogr>
		<title level="m" type="main">Ludeon Studios</title>
		<author>
			<persName><forename type="first">T</forename><surname>Sylvester</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Rimworld</forename></persName>
		</author>
		<imprint>
			<date type="published" when="2018-10">Oct. 2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b25">
	<monogr>
		<title level="m">Caves of Qud</title>
				<meeting><address><addrLine>Freehold Games, South Bend, IN and Berkeley, CA</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2015-07-15">Jul. 15, 2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b26">
	<monogr>
		<title level="m" type="main">MIARMY | Home</title>
		<ptr target="https://www.miarmy.com/#/" />
		<imprint>
			<date type="published" when="2024-08-29">Aug. 29, 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b27">
	<monogr>
		<title level="m" type="main">Massive Software</title>
		<ptr target="https://www.massivesoftware.com/" />
		<imprint>
			<date type="published" when="2024-08-29">Aug. 29, 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b28">
	<monogr>
		<title level="m" type="main">Defuzz Process -Feishu Docs</title>
		<ptr target="https://basefount.feishu.cn/wiki/GhgswVsrfidfOVkmFcgc1XoYnKA" />
		<imprint>
			<date type="published" when="2024-08-29">Aug. 29, 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b29">
	<analytic>
		<title level="a" type="main">Autonomous pedestrians</title>
		<author>
			<persName><forename type="first">W</forename><surname>Shao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Terzopoulos</surname></persName>
		</author>
		<idno type="DOI">10.1016/j.gmod.2007.09.001</idno>
	</analytic>
	<monogr>
		<title level="j">Graph. Models</title>
		<imprint>
			<biblScope unit="volume">69</biblScope>
			<biblScope unit="issue">5-6</biblScope>
			<biblScope unit="page" from="246" to="274" />
			<date type="published" when="2007-09">Sep. 2007</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b30">
	<monogr>
		<title level="m" type="main">A Decision Network Framework for the Behavioral Animation of Virtual Humans</title>
		<author>
			<persName><forename type="first">Q</forename><surname>Yu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Terzopoulos</surname></persName>
		</author>
		<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b31">
	<analytic>
		<title/>
		<author>
			<persName><forename type="first">W</forename><surname>Wright</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">The Sims</title>
		<imprint>
			<date type="published" when="2000">2000</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b32">
	<analytic>
		<title level="a" type="main">Needs-based AI</title>
		<author>
			<persName><forename type="first">R</forename><surname>Zubek</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Game Programming Gems 8</title>
				<meeting><address><addrLine>A. Lake; Florence, KY</addrLine></address></meeting>
		<imprint>
			<publisher>Cengage Learning</publisher>
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b33">
	<monogr>
		<title level="m" type="main">Concurrent Interactions in The Sims 4</title>
		<ptr target="https://gdcvault.com/play/1020190/Concurrent-Interactions-in-The-Sims" />
		<imprint>
			<date type="published" when="2024-08-30">Aug. 30, 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b34">
	<monogr>
		<title level="m" type="main">Modeling Individual Personalities in The Sims 3</title>
		<ptr target="https://www.gdcvault.com/play/1012450/Modeling-Individual-Personalities-in-The" />
		<imprint>
			<date type="published" when="2024-08-29">Aug. 29, 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b35">
	<analytic>
		<title level="a" type="main">Fast, Declarative, Character Simulation Using Bottom-Up Logic Programming</title>
		<author>
			<persName><forename type="first">I</forename><surname>Horswill</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Hill</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">presented at the AIIDE Workshop on Experimental Artificial Intelligence in Games</title>
				<meeting><address><addrLine>, Utah, USA</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2023-10">Oct. 2023</date>
		</imprint>
		<respStmt>
			<orgName>University of Utah</orgName>
		</respStmt>
	</monogr>
</biblStruct>

<biblStruct xml:id="b36">
	<analytic>
		<title level="a" type="main">Fast, Declarative, Character Simulation Using Bottom-Up Logic Programming</title>
		<author>
			<persName><forename type="first">I</forename><surname>Horswill</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Hill</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">AIIDE 24, PersonActionAt.Set(person, moving</title>
				<imprint/>
	</monogr>
	<note>If(ArrivedAtDestination</note>
</biblStruct>

<biblStruct xml:id="b37">
	<monogr>
		<title level="m">ActionTimer = Timer</title>
				<imprint/>
	</monogr>
	<note>Action. person</note>
</biblStruct>

<biblStruct xml:id="b38">
	<monogr>
		<author>
			<persName><surname>Actiontimer</surname></persName>
		</author>
		<title level="m">StartWhen(ArrivedAtDestination, PersonActionAt, ActionTypeInteractionTime</title>
				<imprint/>
	</monogr>
	<note>actionType, count</note>
</biblStruct>

<biblStruct xml:id="b39">
	<monogr>
		<title level="m">ReadyToSelectAction = Event</title>
				<imprint/>
	</monogr>
	<note>ActionTimer.NotOnTimer)</note>
</biblStruct>

<biblStruct xml:id="b40">
	<monogr>
		<title/>
		<author>
			<persName><surname>Personactionat</surname></persName>
		</author>
		<imprint/>
	</monogr>
	<note>Add[person, actionType, location, true. If(PersonActionBestScore</note>
</biblStruct>

<biblStruct xml:id="b41">
	<monogr>
		<title level="m">person, needType, delta).Is( ActionTimer.TimerFinished, PersonActionAt, ActionSatisfiesNeed[actionType, needType</title>
				<imprint/>
	</monogr>
	<note>CompletedAction = Definition</note>
</biblStruct>

<biblStruct xml:id="b42">
	<monogr>
		<title level="m">person, needType), need).If( CompletedAction[person, needType, delta], NeedByType[person, needType, needCol</title>
				<editor>
			<persName><surname>Needbytype</surname></persName>
		</editor>
		<editor>
			<persName><surname>Set</surname></persName>
		</editor>
		<imprint/>
	</monogr>
	<note>UpdateNeed[needCol, delta, need</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
