beliefs  {
 % Green and red light rules.
 go (X)  :-  green (X).
 stop (X)  :-  red (X).
}
Algorithm 3