Author Topic: RE:Riddle I found  (Read 915 times)

K so I made a script to test solutions endlessly
Code: [Select]
function servercmdSolveRiddle(%client,%loops){
//echo("FILL 1");
%koops=0;
%i=0;
while(%i<4){
%o=0;
while(%o<4){
%boxes[%i,%o]=1;
%o++;
}
%i++;
}

%solution = 0;
%y6=0;
while(%y6<%loops){
//echo("FILLIN");
%i=0;
while(%i<4){
%o=0;
while(%o<4){
%boxes[%i,%o]=1;
%o++;
}
%i++;
}
//echo("SCATTER SHOT");
if($debugrid){
%boxes[0,0]=0;
%boxes[0,1]=0;
%boxes[0,2]=0;
%boxes[0,3]=0;
%boxes[1,0]=0;
%boxes[2,0]=0;
%boxes[3,0]=0;
}else{
%k =0;
while(%k<6){
%x=getrandom(0,3);
%y=getrandom(0,3);
if(%boxes[%x,%y]){
%boxes[%x,%y]=0;
%k++;
}
}
}
//now check if it's the solution
//echo("CHECKING");
%row=0;%row2=0;%row3=0;%row4=0;%col=0;%col2=0;%col3=0;%col4=0;
%t=0;
%row=0;
while(%t<4){
%row += %boxes[%t,0];
%t++;
}
%t=0;
%row2=0;
while(%t<4){
%row2 += %boxes[%t,1];
%t++;
}
if(%row==%row2||%row==0||%row2==0){
%t=0;

%row3=0;
while(%t<4){
%row3 += %boxes[%t,2];
%t++;
}
%rnum=%row2;
if(%row2==0){
%rnum=%row;
}
if(%rnum==%row3||%row3==0){
%t=0;
%row4=0;
while(%t<4){
%row4 += %boxes[%t,3];
%t++;
}
if(%rnum==%row4||%row4==0){
%t=0;
%col=0;
while(%t<4){
%col += %boxes[0,%t];
%t++;
}
%t=0;
%col2=0;
while(%t<4){
%col2 += %boxes[1,%t];
%t++;
}
if(%col2==%col||%col==0||%col2==0){
%t=0;
%col3=0;
while(%t<4){
%col3 += %boxes[2,%t];
%t++;
}
%cnum=%col2;
if(%col2==0){
%cnum=%col;
}
if(%col3==%cnum||%col3==0){
%t=0;
%col4=0;
while(%t<4){
%col4 += %boxes[3,%t];
%t++;
}
if(%cnum==%col4||%col4==0){
announce("Solution!");
%solution=1;
}
}
}
}
}
}
//echo("DONE CHECKING");
%y6++;
%mesg="TRY:";
%yo=0;
while(%yo<4){
%yi=0;
while(%yi<4){
%mesg=%mesg SPC %boxes[%yo,%yi];
%yi++;
}
%yo++;
}
announce(%mesg);
announce(%row SPC %row2 SPC %row3 SPC %row4 SPC %col SPC %col2 SPC %col3 SPC %col4);
echo(%mesg);
if(%solution){return;}

}
}

It takes away 6 random circles and checks it.
I ran 20,000 tests and no solutions arose. I do believe this means it's impossible.

o o    o
   o o o
o o o 
o    o o

o o    o
   o o o
o o o 
o    o o
You need to take away six.
That's four.

o    o o o
o    o
o o o o o
      o    o
o o o    o