Introduction to Lattice Simulations. Cellular Automata What are Cellular Automata or CA? A cellular automata is a discrete model used to study a range.

Slides:



Advertisements
Similar presentations
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Advertisements

1 The Game of Life Supplement 2. 2 Background The Game of Life was devised by the British mathematician John Horton Conway in More sophisticated.
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
CELLULAR AUTOMATON Presented by Rajini Singh.
Emulating Physics Our goal will be to show how basic dynamics known from physics can be formulated using local simple rules of cellular automata: diffusion.
CS Summer 2005 Final class - July 1st Assorted fun topics in computability and complexity.
Cellular Automata MATH 800 Fall “Cellular Automata” 588,000 results in 94,600 results in 61,500 results in 2.
1 Patti Bodkin Saint Michael’s College Colchester, VT
Monte Carlo Simulation of Ising Model and Phase Transition Studies
Joanne Turner 15 Nov 2005 Introduction to Cellular Automata.
1 The Potts model Mike Sinclair. 2 Overview Potts model –Extension of Ising model –Uses interacting spins on a lattice –N-dimensional (spin states > 2)
Memory Hierarchies for Quantum Data Dean Copsey, Mark Oskin, Frederic T. Chong, Isaac Chaung and Khaled Abdel-Ghaffar Presented by Greg Gerou.
Lectures on Cellular Automata Continued Modified and upgraded slides of Martijn Schut Vrij Universiteit Amsterdam Lubomir Ivanov Department.
Today’s Plan Introduction to Artificial Life Cellular Automata
Nawaf M Albadia Introduction. Components. Behavior & Characteristics. Classes & Rules. Grid Dimensions. Evolving Cellular Automata using Genetic.
General Purpose 3D Cellular Automata Modeller. A Regular Lattice of Cells, each obeying the same set of rules Simple rules for individual cells can produce.
Parallelization: Conway’s Game of Life. Cellular automata: Important for science Biology – Mapping brain tumor growth Ecology – Interactions of species.
Introduction Computational Challenges Serial Solutions Distributed Memory Solution Shared Memory Solution Parallel Analysis Conclusion Introduction: 
Monte Carlo Simulation of Ising Model and Phase Transition Studies By Gelman Evgenii.
Chapter 12: Simulation and Modeling
Discovery of Cellular Automata Rules Using Cases Ken-ichi Maeda Chiaki Sakama Wakayama University Discovery Science 2003, Oct.17.
The Role of Artificial Life, Cellular Automata and Emergence in the study of Artificial Intelligence Ognen Spiroski CITY Liberal Studies 2005.
Dynamic Models of Segregation
Lecture 8 – Stencil Pattern Stencil Pattern Parallel Computing CIS 410/510 Department of Computer and Information Science.
Complex systems complexity chaos the butterfly effect emergence determinism vs. non-determinism & observational non-determinism.
F.F. Assaad. MPI-Stuttgart. Universität-Stuttgart Numerical approaches to the correlated electron problem: Quantum Monte Carlo.  The Monte.
Governor’s School for the Sciences Mathematics Day 13.
CS 484 – Artificial Intelligence1 Announcements Lab 4 due today, November 8 Homework 8 due Tuesday, November 13 ½ to 1 page description of final project.
Numerical Experiments in Spin Network Dynamics Seth Major and Sean McGovern ‘07 Hamilton College Dept. of Physics Spin networks In one approach to quantum.
1 Cellular Automata and Applications Ajith Abraham Telephone Number: (918) WWW:
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
Cellular Automata Spatio-Temporal Information for Society Münster, 2014.
CELLULAR AUTOMATA A Presentation By CSC. OUTLINE History One Dimension CA Two Dimension CA Totalistic CA & Conway’s Game of Life Classification of CA.
Parallel Programming 0024 Spring Semester 2010 May 6, 2010.
Research Into the Time Reversal of Cellular Automata Team rm -rf / Daniel Kaplun, Dominic Labanowski, Alex Lesman.
Cellular Automata Martijn van den Heuvel Models of Computation June 21st, 2011.
Model Iteration Iteration means to repeat a process and is sometimes referred to as looping. In ModelBuilder, you can use iteration to cause the entire.
The Ising Model Mathematical Biology Lecture 5 James A. Glazier (Partially Based on Koonin and Meredith, Computational Physics, Chapter 8)
Two Temperature Non-equilibrium Ising Model in 1D Nick Borchers.
28 February, 2003University of Glasgow1 Cluster Variation Method and Probabilistic Image Processing -- Loopy Belief Propagation -- Kazuyuki Tanaka Graduate.
Visual Information Systems Recognition and Classification.
STATISTICAL COMPLEXITY ANALYSIS Dr. Dmitry Nerukh Giorgos Karvounis.
ATOMIC orbitals!. When the a planet moves around the sun, you can plot a definite path for it which is called an orbit. A simple view of the atom looks.
Introduction to Particle Simulations Daniel Playne.
Animating Tessellations of the Plane with Statistic Models Ben McCabe Advisor: Rolfe Petschek Department of Physics, Case Western Reserve University Artists,
The Northern Lights: Demonstrations. Programmability Overview A major aspect of our project is programmability- it is an interactive display medium, the.
Cellular Automata FRES 1010 Eileen Kraemer Fall 2005.
Cellular Automata Introduction  Cellular Automata originally devised in the late 1940s by Stan Ulam (a mathematician) and John von Neumann.  Originally.
Introduction to Molecular Magnets Jason T. Haraldsen Advanced Solid State II 4/17/2007.
Javier Junquera Introduction to atomistic simulation methods in condensed matter Alberto García Pablo Ordejón.
Video Textures This is a very cool paper.. Why video texturing? Static images are boring Video clips are finite in length We need something more interesting.
Cellular Automata Martijn van den Heuvel Models of Computation June 21st, 2011.
CS851 – Biological Computing February 6, 2003 Nathanael Paul Randomness in Cellular Automata.
A few of the people involved and what they’ve done.
Javier Junquera Importance sampling Monte Carlo. Cambridge University Press, Cambridge, 2002 ISBN Bibliography.
MA354 Math Modeling Introduction. Outline A. Three Course Objectives 1. Model literacy: understanding a typical model description 2. Model Analysis 3.
Monte Carlo Simulation of Canonical Distribution The idea is to generate states i,j,… by a stochastic process such that the probability  (i) of state.
Computational Physics (Lecture 10) PHY4370. Simulation Details To simulate Ising models First step is to choose a lattice. For example, we can us SC,
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
Modelling Complex Systems Video 4: A simple example in a complex way.
Monte Carlo Simulation of the Ising Model Consider a system of N classical spins which can be either up or down. The total.
1 1 2 What is a Cellular Automaton? A one-dimensional cellular automaton (CA) consists of two things: a row of "cells" and a set of "rules". Each of.
Spatio-Temporal Information for Society Münster, 2014
Cellular Automata Pedro R. Andrade Tiago Garcia de Senna Carneiro
Computational Physics (Lecture 10)
Chapter 3: Complex systems and the structure of Emergence
Illustrations of Simple Cellular Automata
Ising Model of a Ferromagnet
Spatio-temporal information in society: cellular automata
OSU Quantum Information Seminar
Presentation transcript:

Introduction to Lattice Simulations

Cellular Automata What are Cellular Automata or CA? A cellular automata is a discrete model used to study a range of phenomena. These models have applications in: computability theory, mathematics, physics, complexity, biology etc

CAs generally consist of a grid of cells, each of which has a finite number of possible states. This is what we mean when we say it is a discrete model. The simplest CA cells have two possible states “on” or “off. Cellular Automata

These cells represent the ‘state’ of the simulation. Each cell is updated based on the rules of the CA and the states of the neighbouring cells. This is the ‘dynamics’ of the simulation. Cellular Automata

A Cellular Automata is usually run over many generations to see how the system behaves. Cellular Automata

One famous Cellular Automata is Wolfram’s CA. This is a one dimensional cellular automata which the value of each cell depends on its state and the state of its two neighbours. These rules can be encoded easily into an integer. Wolfram’s Cellular Automata

Rules for this automata can be easily built from the following representation: This rule set can be represented by the integer Wolfram’s Cellular Automata

Wolfram’s Cellular Automata

Conway’s Game Of Life Conway’s game of life is an automata designed to simulate life. Each cell in this automata can be either ‘alive’ or ‘dead’.

Conway’s Game Of Life 1. Any live cell with fewer than two live neighbours dies, as if caused by under-population. 2. Any live cell with two or three neighbours lives onto the next generation. 3. Any live cell with more than three live neighbours dies, as if by overcrowding. 4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

Conway’s Game Of Life A simple two-dimensional CA like this can exhibit quite remarkable behaviour. This simple game shows patterns and complex ‘organisms’ emerging from extremely simple rules.

Ising Model The Ising model is model of ferromagnetism named after the physicist Ernst Ising. Each cell in this model represents a magnetic dipole or atomic ‘spins’ in one of two states ‘up’ or ‘down’.

Ising Model Each of these atomic spins interacts with its neighbours and either remains the same or flips. The rules or dynamics of the model are:

Ising Model 1. If the spin is different to two or more neighbours, change spin. 2. If the spin is different to zero or one neighbours, change with some probability. 3. Else remain the same.

Metropolis Algorithm To update this model, iterating through the cells is not acceptable. This causes sweeping effects and the results end up incorrect. Instead we use an update algorithm called the Metropolis Algorithm.

Metropolis Algorithm To update this model, iterating through the cells is not acceptable. This causes sweeping effects and the results end up incorrect. Instead we use an update algorithm called the Metropolis Algorithm.

Metropolis Algorithm Randomly select a spin and compute the energy E(s). Change the spin and calculate the new energy E(s’). Calculate the change in energy ΔE = E(s’)-E(s)

Metropolis Algorithm Accept the change if: ΔE <= 0 or with probability exp(-B*ΔE)

Ising Model Given this update method all we need to define the Ising model is the energy function or Hamiltonian:

Ising Model This is no longer a simple cellular automata because the dynamics depends on some probability. Changing this probability now controls how the model behaves.

Potts Model The Potts model is very similar to the Ising model. However, rather than simply allowing an atomic spin to be ‘up’ or ‘down’ it has Q states. The Potts model with Q=2 is the Ising model.

Potts Model The Potts model is also updated using the Metropolis algorithm, so all we need is the Hamiltonian. The Hamiltonian for the Potts model is simply:

Potts Model This model also shows a phase transition depending on temperature. This is quite an extensible model. Q can be increased to allow each spin to have more possible states. Increase Q enough and this model becomes the XY model.

XY Model The XY model is the extension of the Potts model into continuous space. Rather than a discrete value for each cell, each spin is represented by an angle.

XY Model This model also uses the Metropolis algorithm so all we need is the Hamiltonian:

Heisenberg Model The final extension of this model is the Classical Heisenberg Model where each spin is a three-dimensional vector.

Heisenberg Model Once again this model can be described by a Hamiltonian:

Lattice Simulations These models should show an obvious progression from a simple discrete case of the Ising right through to the more physically realistic Heisenberg Model.

Programming Lattice Simulations Studying these models often requires many simulations and measurements. This is an obvious case when it makes sense to use parallel programming.

Programming Lattice Simulations Task parallelism – The easiest and most obvious way to split up these simulations is to use task parallelism. If you have 1000 simulations to run and 10 machines available. Simply have each machine run 100 simulations and combine the statistics afterwards.

Programming Lattice Simulations This is the best approach if you are using a cluster. Another attractive alternative is to use GPUs. In this case the tasks can’t simply be split between the processors in a GPU because of memory issues.

Programming Lattice Simulations Instead it is better to have each GPU work on one simulation at a time. This is known as data-parallelism. However, for the type of simulation we have discussed there is a significant problem with this: The Metropolis Algorithm

Programming Lattice Simulations Think about the way that the Metropolis Algorithm works. Randomly pick a spin and update it based on the value of its neighbours. If two threads happen to pick spins next to each other, they will update both spins at the same time and update both of them.

Programming Lattice Simulations This may not seem like a big deal but it can have a subtle impact on the behaviour of the simulation. As even a subtle change affects the statistics of the model this is unacceptable.

Programming Lattice Simulations The common solution to this problem is the checkerboard or red/black update method. In this algorithm each cell is colored like a checkerboard. When a model is update, first all the ‘black’ cells are updated and then all the ‘red’ cells are updated.

Programming Lattice Simulations This way no two neighbouring cells are updated at the same time. This is generally accepted to be a suitable solution to the problem.

Programming Lattice Simulations However, it does have an impact on performance. Most memory prediction and caching assumes that sequential memory address will be accessed. This is normally the case for most programs, iterate through a sequence accessing each one.

Programming Lattice Simulations For GPUs this is an even bigger requirement for performance. Sequential threads accessing sequential memory addresses can read all the values in a single transaction, if this condition is not fulfilled the memory reads must be broken into multiple transactions.

Programming Lattice Simulations One method of overcoming this problem is a method called crinkling. This method rearranges the checkerboard so that sequentially access values are stored sequentially.

Programming Lattice Simulations A small change like this can have a large impact on the performance of a simulation.

Summary Cellular Automata Lattice Models Ising Potts XY Heisenberg Metropolis Algorithm Programming Lattice Simulations