lisp代写:The game of life

The game of life is normally played on a grid.. See http::////een..wwikipedia..oorg//wwiki//CConway%%227s_Game_of_Life . You can imagine),, a B23//SS24 version of it played on the line.. For the line version,, the 4 significant neighbours of a cell are the next and second next cells at its right and left..

Write a set of Lisp functions to implement this variation of the game..

The main function must be (LLifeLine c onf gen)) , where conf is the initial configuration of the game – represented as a list containing the ‘rrelative’’ coordinates of live cells,, and gen is the number of generations the game is to be played for.. The output should be the sequence of configuration s corresponding to each generation..

For example (LLifeLine ‘((11 2)) 5)) should produce the output::