Question: Can you write a syntax based on the pseudocode is given below to track the number of dots per time in conway's game of life

Can you write a syntax based on the pseudocode is given below to track the number of dots per time in conway's game of life and also, if possible try to introduce another "species" to compete with the population of the original program.

Can you write a syntax based on the pseudocode is given belowto track the number of dots per time in conway's game oflife and also, if possible try to introduce another "species" to compete

. You are given two matlab programs that implement a basic "Game of Life". One is a fairly strait- forward implementation and the other an attempt to make it as small as possible. Both implement the following: -Uses a n n grid (say 50x50)-start small when debugging Initial random distribution of cells uses the "rand function! Periodic boundary conditions to make it "infinite - Uses matrices to represent the grid. Loops over the life time uber of iterations Uses the "spy function to plot (replot) the matrix every iteration. Form groups of 2-3. . Make a ".m file of both programs and koep them! Run, Test and understand both programs. Create a commented version of the small program that explains how cach line works. This is the small program: function game(n,m,t) B = round(rand(n,n)); for time-t for i=1:n for j-1:m cola - Li-1,i,i+1] cola(colan)1; colb [J-1.j.j+1]; = colb(colb>m)-1; R=sum (sum (A (cola, colb)) ) ; B(i,j)-(CR-3 IR4)&& A(i,j R-3 &"B(i,j)); end end spy (B); pause (0.05); end . You are given two matlab programs that implement a basic "Game of Life". One is a fairly strait- forward implementation and the other an attempt to make it as small as possible. Both implement the following: -Uses a n n grid (say 50x50)-start small when debugging Initial random distribution of cells uses the "rand function! Periodic boundary conditions to make it "infinite - Uses matrices to represent the grid. Loops over the life time uber of iterations Uses the "spy function to plot (replot) the matrix every iteration. Form groups of 2-3. . Make a ".m file of both programs and koep them! Run, Test and understand both programs. Create a commented version of the small program that explains how cach line works. This is the small program: function game(n,m,t) B = round(rand(n,n)); for time-t for i=1:n for j-1:m cola - Li-1,i,i+1] cola(colan)1; colb [J-1.j.j+1]; = colb(colb>m)-1; R=sum (sum (A (cola, colb)) ) ; B(i,j)-(CR-3 IR4)&& A(i,j R-3 &"B(i,j)); end end spy (B); pause (0.05); end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!