<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Artificial Intelligence(In Progress)]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=763</link>
		<description><![CDATA[The most recent posts in Artificial Intelligence(In Progress).]]></description>
		<lastBuildDate>Wed, 28 May 2014 04:15:56 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6829#p6829</link>
			<description><![CDATA[<p>I am going to start testing in some test area style spaces because the textures are a distraction for now:</p><p><span class="postimg"><img src="https://sites.google.com/site/maratisfiles/files/Screenshot%20%28978%29.png" alt="https://sites.google.com/site/maratisfiles/files/Screenshot%20%28978%29.png" /></span></p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Wed, 28 May 2014 04:15:56 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6829#p6829</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6780#p6780</link>
			<description><![CDATA[<p>I need to make a simple Say() function that sets a text to a string. </p><div class="codebox"><pre><code>Say(&quot;Hello Maratis&quot;)</code></pre></div><p>I could also make this an audio thing so that I could possibly type:<br /></p><div class="codebox"><pre><code>if happy then
    Say(hello)
end</code></pre></div><p>However, in the event that the Say() function is choosing an audio file to play based on an emotion I could type:</p><div class="codebox"><pre><code>Say(hello)</code></pre></div><p>And the character can choose from three different ways to say hello given an feeling:</p><div class="codebox"><pre><code>if happy then 
   hello = getObject(&quot;HelloHappy&quot;)
elseif sad then
   hello = getObject(&quot;HelloSad&quot;)
elseif normal then
   hello = getObject(&quot;HelloNorm&quot;)
end</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sun, 18 May 2014 05:07:14 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6780#p6780</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6690#p6690</link>
			<description><![CDATA[<p>Just uploaded a very quick and dirty version of the senses system in 3rd person.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Tue, 08 Apr 2014 01:07:30 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6690#p6690</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6689#p6689</link>
			<description><![CDATA[<p>Okay, after a very good conversation on gamedev.net<br /><a href="http://www.gamedev.net/topic/655272-i-have-some-new-habits/">http://www.gamedev.net/topic/655272-i-h &#133; ew-habits/</a></p><p>I think I will be applying fuzzy logic instead of boolean logic to make the Senses system more realistic. For the main 5 senses I will use boolean logic. But to make this more of an AI system, I will use fuzzy logic.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Mon, 07 Apr 2014 04:47:28 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6689#p6689</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6688#p6688</link>
			<description><![CDATA[<p>Okay, here are a list of things that I can use the current Senses system for:</p><p>Automatic Navigation -- If an object is seen, the walking character can turn left or turn right. They can jump or duck. I can make invisible primitive planes that, if seen, can make the character turn a certain direction, or perform any other type of action. The same goes for touch. I can&#039;t get hearing working yet, and smell requires a particle system (there is one, but it still crashes on me.)</p><p>Enemy AI -- if an an enemy sees you, they can attack you. </p><p>Trigger Emotions-- The senses can trigger a change in state. Perhaps the character is happy and a happy animation plays, but when it sees a dog, it gets afraid, and the character does a 180&#039; and runs?</p><p>I will try to put together a little demo that demonstrates several of these scenarios.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sun, 06 Apr 2014 20:08:08 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6688#p6688</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6641#p6641</link>
			<description><![CDATA[<p>Can&#039;t get this distance thing to work right. The ears are parented to the player, which is moving. At the start of the program, the distance reads 33. It only changes when I move the monkey, not when I get closer to the monkey. It seems the distance is being calculated between the monkey and some point in the middle of the level. I checked to see if the origin of the ears is off, but it isn&#039;t. </p><p>Here is the code for calculating the distance:</p><div class="codebox"><pre><code>function Hear(object)
    earPosition = getPosition(ears)
    heardObjectPosition = getPosition(object)
    
    x2= heardObjectPosition[1]
    x1= earPosition[1]
    y2= heardObjectPosition[2]
    y1= earPosition[2]
    z2= heardObjectPosition[3]
    z1= earPosition[3]
    
    xDiff = x2-x1
    yDiff = y2-y1
    zDiff = z2-z1
    
    radicand =  math.pow(xDiff,2) + math.pow(yDiff,2) + math.pow(zDiff,2)
    distance = math.sqrt(radicand)
    
    if distance &gt; 20 and distance &lt; 30 then
        setText(hear,&quot;I hear something...&quot;)
    else
        setText(hear,&quot;I hear nothing&quot;)
    end
    
    setText(hear_distance,&quot;Distance:&quot;..distance)
end</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Wed, 26 Mar 2014 04:21:02 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6641#p6641</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6604#p6604</link>
			<description><![CDATA[<p>This is just a note to do some research on sensory cues, mainly auditory cues and visual cues. Wikipedia has a very nice article it.</p><p>Edit: Okay, I put all the text in another scene and used enableCameraLayer() to project it over the main camera. Now I can easily add readouts. I added a readout that displays the name of the object collected (small box).</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Thu, 20 Mar 2014 04:24:22 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6604#p6604</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6578#p6578</link>
			<description><![CDATA[<p>Haha. I should just use the vec3() function. Didn&#039;t even think of it</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Fri, 07 Mar 2014 05:12:49 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6578#p6578</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6562#p6562</link>
			<description><![CDATA[<p>Okay, thanks, I will change it before the final upload. If you want to change it, just click it in the Editor and change the gain.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Tue, 04 Mar 2014 16:19:12 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6562#p6562</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6556#p6556</link>
			<description><![CDATA[<p>The monkey sound is too loud.</p>]]></description>
			<author><![CDATA[dummy@example.com (Akira_san)]]></author>
			<pubDate>Tue, 04 Mar 2014 01:51:40 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6556#p6556</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6555#p6555</link>
			<description><![CDATA[<p>Here is the updated file with a bit more environment. I added a simple pickup function and I hid the text on the screen. I also made some music and added it to the scene. </p><p><a href="https://sites.google.com/site/maratisfiles/files/SenseSystem.zip">https://sites.google.com/site/maratisfi &#133; System.zip</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Mon, 03 Mar 2014 22:57:13 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6555#p6555</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6554#p6554</link>
			<description><![CDATA[<p>I see.</p>]]></description>
			<author><![CDATA[dummy@example.com (Akira_san)]]></author>
			<pubDate>Mon, 03 Mar 2014 20:00:13 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6554#p6554</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6553#p6553</link>
			<description><![CDATA[<p>I am trying to avoid randomness, and try to program a system that does things with intent. For instance, a person doesn&#039;t randomly walk somewhere. They usually have intent. So an enemy should move with intent. </p><p>I am also going to have states that determine what the enemy does. </p><p>Is the enemy tired? He will go to sleep (play some animation)</p><p>Is he angry? He will pout (some pout animation). </p><p>I could set a timer to determine when the enemy will go to sleep. Perhaps that will be a chance for you to sneak past him?</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Mon, 03 Mar 2014 19:15:59 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6553#p6553</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6552#p6552</link>
			<description><![CDATA[<p>This looks like interesting thing to look at - Enemy AI – random movement<br /><a href="http://www.freeactionscript.com/tag/enemy-random-movement/">http://www.freeactionscript.com/tag/ene &#133; -movement/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Akira_san)]]></author>
			<pubDate>Mon, 03 Mar 2014 18:12:58 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6552#p6552</guid>
		</item>
		<item>
			<title><![CDATA[Re: Artificial Intelligence(In Progress)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6551#p6551</link>
			<description><![CDATA[<p>Watch out! I move fast! haha. This is the beginning of my Hear() function. It is short, but almost complete. </p><div class="codebox"><pre><code>import math
function Hear(object)
    earPosition = getPosition(ears)
    heardObjectPosition = getPosition(object)

    x2= earPosition[1]
    x1= heardObjectPosition[1]
    y2= earPosition[2]
    y1= heardObjectPosition[2]

    xDiff = x2-x1
    yDiff = y2-y1

    radicand =  math.pow(xDiff,2) + math.pow(yDiff,2)
    
    distance = math.sqrt(radicand)
    
    if distance == 0 then
        setText(txt_hearing,&quot;I hear something...&quot;)
    else
        setText(txt_hearing,&quot;I hearn nothing&quot;)
    end
end</code></pre></div><p>I think that calculus course is coming in handy for checking if things are working. I have to check minimums and maximums to see if it works on either side of 0. I am not printing the distance yet.</p><p>I put the &quot;squeeze&quot; on the distance and here is how it checked out:<br /></p><div class="codebox"><pre><code>--At start distance is not equal to 0
--At start distance is greater than 0, which is how it should be. 
-- At start distance is not less than 10
-- At start distance is greater than 10
--I think this might be a scale issue.  I am going to move a box around in the environment to see the scale of the scene. 
-- Turns out, at start, the distance between the ears and the monkey is roughly 130 units. 
-- at start, distance is greater than 20 and less than 30</code></pre></div><p>This doesn&#039;t seem right, as it was about 130 units in distance along the X-axis.</p><p>I am going to try to use getUnprojectedPoint() this should work better. I will save that for tomorrow. I am going to add some more sound effects to the project for the next upload.</p><p>Update: OOPS, that is not the distance forumula for 3d space. I need a &quot;Z&quot; axis in there.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Mon, 03 Mar 2014 05:46:11 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6551#p6551</guid>
		</item>
	</channel>
</rss>
