So my goal is to display the world as it stands based on these facts(without just hardcoding it):
on(a,table).
on(b,table).
on(c,table).
on(d,table).
on(e,table).
on(f,table).
on(g,table).
on(h,b).
on(i,h).
on(j,i).
on(k,c).
on(l,k).
on(m,f).
on(n,m).
left(a,b).
left(b,c).
left(c,d).
left(d,e).
left(e,f).
left(f,g).
It should look something similar to this after being printed.
J
i L N
h k m
a b c D E f g
___________________________________
Table
I've tried using bagof() similar to this to grab each level but this would get tedious for more than 2 levels, im sure there is a better way to do this I just cant think of it.
bagof(X,(on(X,table)),Bottom),
bagof(D,Z^(on(D,Z),on(Z,table)),Level01),
Any help would be greatly appreciated, thanks.