# IMAGE FILES fname = 'milford1971_21.jpg' ref_name = 'milford1999_21.jpg' #ref_name = 'milford1999_21.jpg' simulation = False; # generate grid prob_grid1 = Grid(add='prob_') prob_grid2 = Grid(add='prob_') grid1 = Grid() grid2 = Grid() #grid = Grid() if simulation: # generate random grid with size m grid1.rndGenerator(grid_size=250, savePlots=False, name='rnd_simulation') else: # load Image to grid grid1.image2Grid(fname, path='Images\\', mode='yuv', output=False, ext_colors=False) grid2.image2Grid(fname, path='Images\\', mode='yuv', output=False, ext_colors=True) prob_grid1.image2Grid(fname, path='Images\\', mode='yuv', output=False, ext_colors=False) prob_grid2.image2Grid(fname, path='Images\\', mode='yuv', output=False, ext_colors=True) # save initial state #init = grid.grid.copy() # Create CA with reference image ca = CellularAutomata(prob_grid2, neighbourhood='Moore', rules='Conway', ref_name=ref_name) #ca2 = CellularAutomata(grid2, neighbourhood='Moore', rules='Probabilistic', ref_name=ref_name) #ca3 = CellularAutomata(prob_grid1, neighbourhood='Moore', rules='Conway', ref_name=ref_name) #ca4 = CellularAutomata(prob_grid2, neighbourhood='Moore', rules='Probabilistic', ref_name=ref_name)