Cellular Automata - next nearest neighbrs

The boundary conditions are periodic in both directions: the top row and bottom rows are adjacent as are the left and right columns. Choose the rules for when changes from occupied to empty (1 -> 0) or empty to occupied (0 -> 1). The neighbor cells are the eight cells that touch either an edge or a corner of the cell.