|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
This page contains some fun online programs written by Tom. Click on the various links below in order to activate the programs. Cellular Automaton: LIFECellular automata are discrete mathematical models involving a grid of cells with each cell being in one of a finite number of states. The cells are advanced in time discretely from time step N to time step N + 1 according to a specified set of transition rules. The most famous cellular automaton is called LIFE and it was invented by the British mathematician John Horton Conway in 1970. In LIFE the cells are squares in a planar grid. Each cell may be in one of two states: alive or dead. Each cell has 8 neighbors. The transition rules are as follows:
The following programs implement the LIFE cellular automaton by representing living cells by the color blue and dead cells by the color white. They differ in the size of the grid and in the various initial patterns that can be selected. In order to start the cellular automaton select an initial pattern in the drop-down list and then click the run button.
Cellular Automaton: LOOPSChris Langton created the LOOPS cellular automaton in the 1980's as a demonstration of artificial life. LOOPS has 8 different states for the spatial cells which are defined as follows:
The organism extends a pseudopod out which makes three left turns and then reconnects back to the body. Once the pseudopod reconnects the dissolver cell dissolves the connection between the child organism and the parent organism. A messenger cell starts the growth of the new pseudopod. Once an organism is totally surrounded by neighbors on all four sides it dies (i.e., all of its internal cells revert to the core state) and no further reproduction is possible. The transition rules involve the four nearest neighbors to a cell (i.e., above, below, to the left, and to the right). The following table shows a timeline of events for the LOOPS cellular automaton:
The following programs implement the LOOPS cellular automaton. They differ in the size of the grid only. In order to start the cellular automaton click the run button.
Simulated EvolutionThe following program simulates evolution on a 50 x 50 planar grid. Each spatial cell must be in one of the following four states:
Each organism has 16 genes which tell it what to do when it is adjacent to either poison or food. Each gene has a numeric value from 1 to 8. Each cell has 8 neighboring cells as follows: 1 2 3 4 * 5 6 7 8 The first 8 genes tell the organism what to do when it is adjacent to poison and the last 8 genes tell the organism what to do when it is adjacent to food. For example, let's suppose that the 9th gene has a value of 1. The 9th gene is the 1st food gene which tells the organism what to do if food is located at relative position 1 (i.e., upper left). In this case the value tells the organism to move to relative position 1 which means that the organism lands on the food and eats it. The cells are advanced in time discretely from time step N to time step N + 1. The transition rules are as follows:
In order to start the cellular automaton select the maximum time step in the drop-down list and then click the run button.
Planetary OrbitThe following program simulates the elliptical orbit of a planet around a star. It demonstrates Kepler's 2nd Law of Planetary Motion which says that the radius vector from the star to the planet sweeps out equal areas in equal times. The user may select any of the following four parameters from drop-down lists:
In order to start the simulation select parameters from the various drop-down lists and then click the run button. In order to stop the simulation click the pause button. You may continue the simulation by clicking the run button. When the simulation is paused you may click the data button in order to bring up a window displaying the following parameters concerning the simulation: mass of star (sun = 1.0), luminosity of star (sun = 1.0), length of semi-major axis of planet's orbit, eccentricity of planet's orbit, orbital period, elapsed time since beginning of simulation, orbit number, current distance from star (A.U.), current azimuthal angle (deg), current orbital velocity (km/sec), current stellar flux (watts per square meter), planetary albedo, current blackbody temperature (deg C), and current surface temperature (deg C). The simulation shows the periastrion point (i.e., the point at which the planet is closest to its star) at the top of the orbit.
Our Solar SystemThe following program simulates the orbits of the following nine planets in our solar system:
The view point of the simulation is from Polaris (i.e., the North Star) which means that all nine planets orbit the sun in the counterclockwise direction. The simulation begins on January 1, 2001 and goes forward in time from there one day at a time. In order to start the simulation click the run button. In order to stop the simulation click the pause button. You may continue the simulation by clicking the run button. When the simulation is paused you may click the data button in order to bring up a window displaying the current data for each of the nine planets. Initially the zoom factor is set so that only Mercury, Venus, Earth, and Mars can be seen. In order to zoom out and see the outer planets click the zoom out button. In order to zoom in and see the inner planets exclusively click the zoom in button. In order to restart the simulation from January 1, 2001 click the restart button.
Tic-tac-toeThe following program allows the user to play a game of tic-tac-toe against the computer. The game board consists of 9 squares arranged in 3 rows with 3 columns per row. The user selects the player who moves first from a drop-down list. Then the user clicks the start game button in order to begin the game. The player moving first will put an X in the cell of his or her choice. The player moving second will put an O in the cell of his or her choice. The user chooses the cell he or she wants by clicking on it. The game proceeds until three X's in a row occur (horizontally, vertically, or diagonally), three O's in a row occur (horizontally, vertically, or diagonally), or there are no more empty cells. At the end of the game the user can click the play again button in order to erase the board and prepare for a new game. Then the user can click the start game button in order to start a new game. The program keeps track of the number of times that the computer has won, the number of times that the user has won, and the number of tie games.
ChessThe following program allows the user to play a game of chess against the computer. The game board consists of 64 squares arranged in 8 rows (i.e., ranks) with 8 columns (i.e., files) per row. The user selects the player who moves first (i.e., the player controlling the white pieces) from a drop-down list. Then the user clicks the start game button in order to begin the game. When it's the user's turn to move the user must first click on the square containing the piece to be moved. Then the user must perform a second click on the destination square for this piece. If the user's move is invalid it will display the string "Illegal move" in the status box and the user must choose a valid destination for that piece. In order to capture one of the computer's pieces the user must choose a destination square occupied by an enemy piece. In order to castle the user must click on his or her king and then click on an empty square on the same rank which is located two squares away from the king (other conditions for castling apply). Pawns of either side that make it all the way to the last rank will be automatically promoted to queens. The game proceeds until the user is checkmated, the computer is checkmated, the game is a stalemate, or the game is a draw. The outcome of the game is displayed in the status box. At the end of the game the user can click the play again button in order to initialize the board and prepare for a new game. Then the user can click the start game button in order to start a new game. The program keeps track of whether the user or the computer is in check, the move number, the user's last move in chess notation, and the computer's last move in chess notation.
|