Topic: Decision Tree Exploration
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).
-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
Certain CONDITIONS affect your current STATE.
Last edited by Tutorial Doctor (2013-10-06 18:05:21)