how to run this module?
what should be the input command
move(state(L,R),state(L1,R1)):-
count(L,N1),
count(R,N2),
change((L,R),(L1,R1),(N1,N2)).
count([],0).
count([_|S], N) :-
count(S,C), N is C + 1.
change((L,R),(L1,R1),(A1,B1)):-
((A1=3,B1=3),
((L=[X1,X2,X3|T],
append([X2,X3,X1],R,R1),L1=[]);(L=[X1,X2,X3|T],
append([X3,X2],R,R1),L1=[X1]);(L=[X1,X2,X3|T],
append([X3],R,R1),L1=[X1,X2]);(R=[X1,X2,X3|T],
append(L,[X1],L1),R1=[X2,X3]);(R=[X1,X2,X3|T],
append(L,[X2,X1],L1),R1=[X3]);(R=[X1,X2,X3|T],
append(L,[X3,X1,X2],L1),R1=[])));((A1=2,B1=4),((L=[X1,X2|T],
append([X2],R,R1),L1=[X1]);(L=[X1,X2|T],
append([X2,X1],R,R1),L1=[]);(R=[X1|T],
append(L,[X1],L1),R1=T);(R=[X1,X2|T],
append(L,[X2,X1],L1),R1=T);(R=[X1,X2,X3|T],
append(L,[X3,X1,X2],L1),R1=T)));((A1=1,B1=5),((L=[X1|T],
append([X1],R,R1),L1=T);(R=[X1|T],
append(L,[X1],L1),R1=T);(R=[X1,X2|T],
append(L,[X2,X1],L1),R1=T);(R=[X1,X2,X3|T],
append(L,[X3,X1,X2],L1),R1=T)));((A1=0,B1=6),((R=[X1|T],
append([X1],L,L1),R1=T);(R=[X1,X2|T],
append([X2,X1],L,L1),R1=T);(R=[X1,X2,X3|T],
append([X3,X1,X2],L,L1),R1=T)));((A1=4,B1=2),((L=[X1,X2,X3,X4|T],
append([X4],R,R1),L1=[X1,X2,X3]);(L=[X1,X2,X3,X4|T],
append([X4,X3],R,R1),L1=[X1,X2]);(L=[X1,X2,X3,X4|T],
append([X3,X4,X2],R,R1),L1=[X1]);(R=[X1|T],
append(L,[X1],L1),R1=T);(R=[X1,X2|T],
append(L,[X2,X1],L1),R1=T)));((A1=5,B1=1),((L=[X1,X2,X3,X4,X5|T],
append([X5],R,R1),L1=[X1,X2,X3,X4]);(L=[X1,X2,X3,X4,X5|T],
append([X5,X4],R,R1),L1=[X1,X2,X3]);(L=[X1,X2,X3,X4,X5|T],
append([X4,X5,X3],R,R1),L1=[X1,X2]);(R=[X1|T],
append(L,[X1],L1),R1=T)),
write((L1,R1)));((A1=6,B1=0),((L=[X1,X2,X3,X4,X5,X6|T],
append([X6],R,R1),L1=[X1,X2,X3,X4,X5]);(L=[X1,X2,X3,X4,X5,X6|T],
append([X6,X5],R,R1),L1=[X1,X2,X3,X4]);(L=[X1,X2,X3,X4,X5,X6|T],
append([X5,X6,X4],R,R1),L1=[X1,X2,X3]))).
what should be the input command
move(state(L,R),state(L1,R1)):-
count(L,N1),
count(R,N2),
change((L,R),(L1,R1),(N1,N2)).
count([],0).
count([_|S], N) :-
count(S,C), N is C + 1.
change((L,R),(L1,R1),(A1,B1)):-
((A1=3,B1=3),
((L=[X1,X2,X3|T],
append([X2,X3,X1],R,R1),L1=[]);(L=[X1,X2,X3|T],
append([X3,X2],R,R1),L1=[X1]);(L=[X1,X2,X3|T],
append([X3],R,R1),L1=[X1,X2]);(R=[X1,X2,X3|T],
append(L,[X1],L1),R1=[X2,X3]);(R=[X1,X2,X3|T],
append(L,[X2,X1],L1),R1=[X3]);(R=[X1,X2,X3|T],
append(L,[X3,X1,X2],L1),R1=[])));((A1=2,B1=4),((L=[X1,X2|T],
append([X2],R,R1),L1=[X1]);(L=[X1,X2|T],
append([X2,X1],R,R1),L1=[]);(R=[X1|T],
append(L,[X1],L1),R1=T);(R=[X1,X2|T],
append(L,[X2,X1],L1),R1=T);(R=[X1,X2,X3|T],
append(L,[X3,X1,X2],L1),R1=T)));((A1=1,B1=5),((L=[X1|T],
append([X1],R,R1),L1=T);(R=[X1|T],
append(L,[X1],L1),R1=T);(R=[X1,X2|T],
append(L,[X2,X1],L1),R1=T);(R=[X1,X2,X3|T],
append(L,[X3,X1,X2],L1),R1=T)));((A1=0,B1=6),((R=[X1|T],
append([X1],L,L1),R1=T);(R=[X1,X2|T],
append([X2,X1],L,L1),R1=T);(R=[X1,X2,X3|T],
append([X3,X1,X2],L,L1),R1=T)));((A1=4,B1=2),((L=[X1,X2,X3,X4|T],
append([X4],R,R1),L1=[X1,X2,X3]);(L=[X1,X2,X3,X4|T],
append([X4,X3],R,R1),L1=[X1,X2]);(L=[X1,X2,X3,X4|T],
append([X3,X4,X2],R,R1),L1=[X1]);(R=[X1|T],
append(L,[X1],L1),R1=T);(R=[X1,X2|T],
append(L,[X2,X1],L1),R1=T)));((A1=5,B1=1),((L=[X1,X2,X3,X4,X5|T],
append([X5],R,R1),L1=[X1,X2,X3,X4]);(L=[X1,X2,X3,X4,X5|T],
append([X5,X4],R,R1),L1=[X1,X2,X3]);(L=[X1,X2,X3,X4,X5|T],
append([X4,X5,X3],R,R1),L1=[X1,X2]);(R=[X1|T],
append(L,[X1],L1),R1=T)),
write((L1,R1)));((A1=6,B1=0),((L=[X1,X2,X3,X4,X5,X6|T],
append([X6],R,R1),L1=[X1,X2,X3,X4,X5]);(L=[X1,X2,X3,X4,X5,X6|T],
append([X6,X5],R,R1),L1=[X1,X2,X3,X4]);(L=[X1,X2,X3,X4,X5,X6|T],
append([X5,X6,X4],R,R1),L1=[X1,X2,X3]))).