Sunday, December 23, 2007

8(n) queens puzzle





The eight queens puzzle is the problem of putting eight chess queens on an 8×8 chessboard such that none of them is able to capture any other using the standard chess queen's moves. This means it is as if all the queens are different colours. The queens must be placed in such a way that no two queens would be able to attack each other. Thus, a solution requires that no two queens share the same row, column, or diagonal. The eight queens puzzle is an example of the more general n queens puzzle of placing n queens on an n×n chessboard(n ≥ 4).

-- Wikipedia


The eight queens puzzle has 92 distinct solutions. If solutions that differ only by symmetry operation (rotations and reflections) of the board are counted as one, the puzzle has 12 unique solutions
The script uses backtracing to find all the distinct solutions for "n queens puzzle" problem

Saturday, November 17, 2007

L-system





An L-system or Lindenmayer system is a formal grammar (a set of rules and symbols) most famously used to model the growth processes of plant development, but also able to model the morphology of a variety of organisms. L-systems can also be used to generate self-similar fractals such as iterated functionsystems. ---------Wikipedia
These images are generated by the same script with different seeds and rules

Monday, November 5, 2007

Genetic Algorithm









A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. Genetic algorithms are a particular class of evolutionary algorithms (also known as evolutionary computation) that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover (also called recombination).---------Wikipedia

Friday, October 26, 2007

Tuesday, October 23, 2007

Friday, October 12, 2007

Thursday, June 7, 2007