theory validity {
// a human weighs between 80 and 400 pounds
$x is a human
& $x weighs ($y pounds)
=> $y >= 80 & $y <= 400
contradiction => say (That can't be right)
}
theory (weight change) {
$x weighs ($y pounds) & last time $x weighed ($z pounds)
=> proc {
if ($y < $z):
say (You lost weight)
else if ($y > $z):
say (You gained weight)
else:
say (You are stagnant)
}
}
theory (remember last weight) {
$x weighs ($y pounds)
=> proc {
delete all (last time $x weighed ($z pounds))
store (last time $x weighed ($y pounds))
}
}
theory (interpret input) {
$x says (i weigh $y pounds)
=> $x weighs ($y pounds)
$x says (my weight is $y pounds)
=> $x weighs ($y pounds)
}
[image: weight.png]
The Java part <http://code.botcompany.de/1025733> is literally just the
language interpreter and chat glue code.
Cheers
Stefan
--
Stefan Reich
BotCompany.de // Java-based operating systems
------------------------------------------
Artificial General Intelligence List: AGI
Permalink:
https://agi.topicbox.com/groups/agi/Tda20a46822c5bb8d-M4bd37d8929acb09fac54488a
Delivery options: https://agi.topicbox.com/groups/agi/subscription