Not member rule doesn't work as expected in Prolog
问题 I am attempting to create a maze program in Prolog, whereby the aim is to find a route from the start of the maze to a point in the centre of the maze called m. The maze consists of squares which are connected using one of four colours: Blue, Green, Purple or Orange. The route from start to the centre follows a repeating pattern of the four colours. I have created the following code: link2(A, Colour, B) :- link(A, Colour, B). link2(A, Colour, B) :- link(B, Colour, A). changecolour(blue,green)