Small update on that AI project- I can compose simple plans now using brute-force simulation-sampling, which is a little messy, but if I get a chance I'll try to combine that with a proper search algorithm for action-plans. (I've largely been focusing on rewriting my citybuilder engine the past few weeks, so I might shift gears again now.)
EDIT: Proper search-algorithm now functioning, which seems to be drastically more efficient aside from being more reliable. (I still need to work out how to anticipate other agents or handle probabilistic effects, though...)
...and here's the final output:
EDIT: Proper search-algorithm now functioning, which seems to be drastically more efficient aside from being more reliable. (I still need to work out how to anticipate other agents or handle probabilistic effects, though...)
Code:
(in world
(element hall is_location)
(element living_room is_location)
(element kitchen is_location)
(element bedroom is_location)
(element toilet is_location)
(element gift is_item )
(actor jill is_actor )
(actor roger is_actor )
((borders hall living_room) = true)
((borders hall kitchen ) = true)
((borders hall bedroom ) = true)
((borders bedroom toilet ) = true)
((at gift ) = living_room)
((at jill ) = bedroom )
((at roger) = kitchen )
(able roger travels )
(able roger collects)
(able roger gives )
(wants roger (has jill gift))
)
...and here's the final output:
Last edited: