<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.gameai.com/manuals/index.php?action=history&amp;feed=atom&amp;title=Input_Parameters</id>
	<title>Input Parameters - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.gameai.com/manuals/index.php?action=history&amp;feed=atom&amp;title=Input_Parameters"/>
	<link rel="alternate" type="text/html" href="http://www.gameai.com/manuals/index.php?title=Input_Parameters&amp;action=history"/>
	<updated>2026-08-27T19:56:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>http://www.gameai.com/manuals/index.php?title=Input_Parameters&amp;diff=176&amp;oldid=prev</id>
		<title>Davemark: /* Boolean Parameters */</title>
		<link rel="alternate" type="text/html" href="http://www.gameai.com/manuals/index.php?title=Input_Parameters&amp;diff=176&amp;oldid=prev"/>
		<updated>2021-10-07T13:38:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Boolean Parameters&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:38, 7 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some input parameters are checking to see if something exists in a Boolean fashion. Because the nature of this type of consideration will only be a &amp;quot;true/false&amp;quot; solution, the response curve for these is usually set to either have [0,0] and [1,1] (for true = 1) or [0,1] and [1,0] (for false = 1).  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some input parameters are checking to see if something exists in a Boolean fashion. Because the nature of this type of consideration will only be a &amp;quot;true/false&amp;quot; solution, the response curve for these is usually set to either have [0,0] and [1,1] (for true = 1) or [0,1] and [1,0] (for false = 1).  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;An example is the input, &amp;quot;HasTag&amp;quot;. This input is merely checking to see if the owner has a specified tag. The tag is placed in the input parameters on the consideration—for example &amp;quot;Invisible&amp;quot;. Therefore, the consideration would be checking to see if the owner has the tag, &amp;quot;invisible&amp;quot;. If so, the input returns &amp;quot;1&amp;quot; and, depending on the orientation of the response curve, the consideration can return 1 or 0.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;An example is the input, &amp;quot;HasTag&amp;quot;. This input is merely checking to see if the owner has a specified &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[entity &lt;/ins&gt;tag&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;. The tag is placed in the input parameters on the consideration—for example &amp;quot;Invisible&amp;quot;. Therefore, the consideration would be checking to see if the owner has the tag, &amp;quot;invisible&amp;quot;. If so, the input returns &amp;quot;1&amp;quot; and, depending on the orientation of the response curve, the consideration can return 1 or 0.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Implementation ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Implementation ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Davemark</name></author>
	</entry>
	<entry>
		<id>http://www.gameai.com/manuals/index.php?title=Input_Parameters&amp;diff=169&amp;oldid=prev</id>
		<title>Davemark: Initial Entries</title>
		<link rel="alternate" type="text/html" href="http://www.gameai.com/manuals/index.php?title=Input_Parameters&amp;diff=169&amp;oldid=prev"/>
		<updated>2021-10-06T15:51:23Z</updated>

		<summary type="html">&lt;p&gt;Initial Entries&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{IAUS Header}}&lt;br /&gt;
{{Part of Behavior}}&lt;br /&gt;
== Concept ==&lt;br /&gt;
'''Input Parameters''' are items that are specified in individual [[consideration]]s that include more data for them to use when calculating the consideration. The types of input parameters that are available (and useful) depend on the type of input that is selected for the consideration.&lt;br /&gt;
=== Value Parameters ===&lt;br /&gt;
Some input parameters allow you to set minimum or maximum values that help determine what the normalized x-axis of 0..1 is meant to represent. For example, when calculating the distance to a target, we may only be concerned with ranges under 20m. In that case, by setting the &amp;quot;RangeMax&amp;quot; parameter to 20, the [[Response Curve]] is automatically scaled so that the distance of 20m is equal to ''x = 1.0''.  &lt;br /&gt;
&lt;br /&gt;
=== Boolean Parameters ===&lt;br /&gt;
Some input parameters are checking to see if something exists in a Boolean fashion. Because the nature of this type of consideration will only be a &amp;quot;true/false&amp;quot; solution, the response curve for these is usually set to either have [0,0] and [1,1] (for true = 1) or [0,1] and [1,0] (for false = 1). &lt;br /&gt;
&lt;br /&gt;
An example is the input, &amp;quot;HasTag&amp;quot;. This input is merely checking to see if the owner has a specified tag. The tag is placed in the input parameters on the consideration—for example &amp;quot;Invisible&amp;quot;. Therefore, the consideration would be checking to see if the owner has the tag, &amp;quot;invisible&amp;quot;. If so, the input returns &amp;quot;1&amp;quot; and, depending on the orientation of the response curve, the consideration can return 1 or 0.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Code ===&lt;br /&gt;
Input Parameters for a consideration are held in a sparse map structure. This is typedef'd in [[Consideration#Code|Consideration.h]] as:&lt;br /&gt;
&amp;lt;SyntaxHighlight&amp;gt;&lt;br /&gt;
typedef std::unordered_map&amp;lt;InputParameter, float&amp;gt; ParameterMap;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This is then declared as a member of the Consideration object as:&lt;br /&gt;
&amp;lt;SyntaxHighlight&amp;gt;&lt;br /&gt;
ParameterMap parameters;		// optional parameters for filtering, adding normalization bookends, etc.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The processing of input parameters is done in [[Consideration#Code|Consideration.cpp]] by helper functions. For example, the following block is asking if there is a ''RangeMax'' parameter in the consideration.&lt;br /&gt;
&amp;lt;SyntaxHighlight&amp;gt;&lt;br /&gt;
float paramMax = GetParameterOrDefault(InputParameter::RangeMax, -1.0f);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This accesses the parameter map on the consideration to see if it exists. Otherwise, it returns the default that was passed in.&lt;br /&gt;
&amp;lt;SyntaxHighlight&amp;gt;&lt;br /&gt;
float Consideration::GetParameterOrDefault(InputParameter thisParam, float thisDefault) const&lt;br /&gt;
{&lt;br /&gt;
	ParameterMap::const_iterator result = parameters.find(thisParam);&lt;br /&gt;
	if (result == parameters.end()) {&lt;br /&gt;
		return thisDefault;&lt;br /&gt;
	}&lt;br /&gt;
	else {&lt;br /&gt;
		return result-&amp;gt;second;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information on how these are used in the calculation of the consideration can be found in [[Consideration#Code|Consideration.cpp]].&lt;br /&gt;
=== Data ===&lt;br /&gt;
&lt;br /&gt;
{{Manual Footer}}&lt;/div&gt;</summary>
		<author><name>Davemark</name></author>
	</entry>
</feed>