Gamemaster
General
Game
Playing
ornatebuttonsandlights
Description
Redundant Buttons and Lights is a variant of Buttons and Lights with extra actions that behave in an identical manner to the three basic actions. All rules are in ground canonical form.
Rulesheet
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% ornatebuttonsandlights %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% metadata %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% role(robot) base(p) base(q) base(r) base(u) base(v) base(w) base(step(1)) base(step(2)) base(step(3)) base(step(4)) base(step(5)) base(step(6)) base(step(7)) base(control(robot)) action(a) action(b) action(c) action(d) action(e) action(f) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% init %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% init(step(1)) init(control(robot)) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% legal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% legal(a) legal(b) legal(c) legal(d) legal(e) legal(f) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% operations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% a :: ~p ==> p a :: p ==> ~p a :: step(1) ==> ~step(1) a :: step(1) ==> step(2) a :: step(2) ==> ~step(2) a :: step(2) ==> step(3) a :: step(3) ==> ~step(3) a :: step(3) ==> step(4) a :: step(4) ==> ~step(4) a :: step(4) ==> step(5) a :: step(5) ==> ~step(5) a :: step(5) ==> step(6) a :: step(6) ==> ~step(6) a :: step(6) ==> step(7) b :: q ==> p b :: ~q ==> ~p b :: p ==> q b :: ~p ==> ~q b :: step(1) ==> ~step(1) b :: step(1) ==> step(2) b :: step(2) ==> ~step(2) b :: step(2) ==> step(3) b :: step(3) ==> ~step(3) b :: step(3) ==> step(4) b :: step(4) ==> ~step(4) b :: step(4) ==> step(5) b :: step(5) ==> ~step(5) b :: step(5) ==> step(6) b :: step(6) ==> ~step(6) b :: step(6) ==> step(7) c :: q ==> r c :: ~q ==> ~r c :: r ==> q c :: ~r ==> ~q c :: step(1) ==> ~step(1) c :: step(1) ==> step(2) c :: step(2) ==> ~step(2) c :: step(2) ==> step(3) c :: step(3) ==> ~step(3) c :: step(3) ==> step(4) c :: step(4) ==> ~step(4) c :: step(4) ==> step(5) c :: step(5) ==> ~step(5) c :: step(5) ==> step(6) c :: step(6) ==> ~step(6) c :: step(6) ==> step(7) d :: ~u ==> u d :: u ==> ~u d :: step(1) ==> ~step(1) d :: step(1) ==> step(2) d :: step(2) ==> ~step(2) d :: step(2) ==> step(3) d :: step(3) ==> ~step(3) d :: step(3) ==> step(4) d :: step(4) ==> ~step(4) d :: step(4) ==> step(5) d :: step(5) ==> ~step(5) d :: step(5) ==> step(6) d :: step(6) ==> ~step(6) d :: step(6) ==> step(7) e :: v ==> u e :: ~v ==> ~u e :: u ==> v e :: ~u ==> ~v e :: step(1) ==> ~step(1) e :: step(1) ==> step(2) e :: step(2) ==> ~step(2) e :: step(2) ==> step(3) e :: step(3) ==> ~step(3) e :: step(3) ==> step(4) e :: step(4) ==> ~step(4) e :: step(4) ==> step(5) e :: step(5) ==> ~step(5) e :: step(5) ==> step(6) e :: step(6) ==> ~step(6) e :: step(6) ==> step(7) f :: v ==> w f :: ~v ==> ~w f :: w ==> v f :: ~w ==> ~v f :: step(1) ==> ~step(1) f :: step(1) ==> step(2) f :: step(2) ==> ~step(2) f :: step(2) ==> step(3) f :: step(3) ==> ~step(3) f :: step(3) ==> step(4) f :: step(4) ==> ~step(4) f :: step(4) ==> step(5) f :: step(5) ==> ~step(5) f :: step(5) ==> step(6) f :: step(6) ==> ~step(6) f :: step(6) ==> step(7) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% goal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% goal(robot,100) :- p & q & r goal(robot,50) :- p & q & ~r goal(robot,50) :- p & ~q & r goal(robot,50) :- ~p & q & r goal(robot,25) :- p & ~q & ~r goal(robot,25) :- ~p & q & ~r goal(robot,25) :- p & ~q & ~r goal(robot,0) :- ~p & ~q & ~r %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% terminal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% terminal :- p & q & r terminal :- step(7) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Facts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% successor(1,2) successor(2,3) successor(3,4) successor(4,5) successor(5,6) successor(6,7) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Stylesheet
//============================================================================== // buttonsandlights //============================================================================== function renderstate (state) {var step = compfindx('N',seq('step','N'),state,library); var table = document.createElement('table'); table.setAttribute('border','0'); var row = table.insertRow(0); var cell = row.insertCell(0); cell.setAttribute('align','center'); cell.setAttribute('style','font-size:20px'); cell.innerHTML = 'Step: ' + step; row = table.insertRow(1); var cell = row.insertCell(0); var board = renderboard(state); cell.appendChild(board); row = table.insertRow(2); var cell = row.insertCell(0); cell.setAttribute('align','center'); cell.setAttribute('style','font-size:20px'); if (compfindp('terminal',state,library)) {cell.innerHTML = 'Game over'} else {cell.innerHTML = ' '}; return table} function renderboard (state) {var table = document.createElement('table'); table.setAttribute('cellspacing','0'); table.setAttribute('bgcolor','white'); table.setAttribute('border','4'); makerow(table,0,state); return table} function makerow (table,rownum,state) {var row =table.insertRow(rownum); makecell(row,'p',state); makecell(row,'q',state); makecell(row,'r',state); return row} function makecell (row,light,state) {var cell = row.insertCell(row.cells.length); cell.setAttribute('width','40'); cell.setAttribute('height','40'); cell.setAttribute('align','center'); cell.setAttribute('valign','center'); if (compfindp(light,state,seq())) {cell.innerHTML = '
'} else {cell.innerHTML = '
'}; return cell} //============================================================================== //============================================================================== //==============================================================================
Ownership