More fun with finite state machines

This is the second part of a post on finite state machines programmed in Prolog. The first part is here. A short intro to Prolog is here. Have fun! A virtual, well-behaved dog Let’s write an FSM that describes some of the common behaviours of pet dogs and that could be used to program a robotic pet. We begin with a very simple FSM that (like the first example above) describes only the eating behaviour of the dog. But now we will do it in actual code. We will do…

Read More