Well first, you should use FOR instead of WHILE:
DEF RANDOM BOARD Y=3 X=3 WHILE Y<26 CELLS[X+2,Y+2]=RND(2) INC X,2 IF X==47 THEN X=3 INC Y,2 WEND NEIGHBORCHECK ENDcan be:
DEF RANDOM BOARD VAR X,Y FOR Y=3 TO 26-1 STEP 2 FOR X=3 TO 47-1 STEP 2 CELLS[X+2,Y+2]=RND(2) NEXT NEXT NEIGHBORCHECK ENDAnyway, I assume the main problem is with the edges This is because everything outside the board is treated as a living cell (because you made 0 = alive and 1 = dead, and it starts out filled with 0s)