<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Decision Tree Exploration]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=807&amp;type=atom"/>
	<updated>2013-10-06T17:56:19Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=807</id>
		<entry>
			<title type="html"><![CDATA[Decision Tree Exploration]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=5360#p5360"/>
			<content type="html"><![CDATA[<p>In this post I want to explore DECISION TREES. If you have a very comprehensive example of a way to use decision trees, please post it here. Please make it easy to understand (clean and simple naming conventions).</p><div class="codebox"><pre><code>-DECISION TREE EXPLORATION

--States
normal = true
happy = false
sad = false
worried = false
afraid = false

--Conditions
got_some_money = false
bump_your_head = false
loose_wallet = false
walk_into_dark_room = false

function GetEmotional(x)
    x = true
end

if got_some_money then
    GetEmotional(happy)
end

--What if we want an animation to play if they are happy:

if got_some_money then
    GetEmotional(happy)
    changeAnimation(object,animationID)
end

--Multiple conditions?

if bump_your_head and walk_into_dark_room then
    GetEmotional(sad)
    GetEmotional(afraid)
end</code></pre></div><p>Certain CONDITIONS affect your current STATE.</p>]]></content>
			<author>
				<name><![CDATA[Tutorial Doctor]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2493</uri>
			</author>
			<updated>2013-10-06T17:56:19Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=5360#p5360</id>
		</entry>
</feed>
