Preview

Solving N-Queens problem using Genetic Algorithms

Good Essays
Open Document
Open Document
4307 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Solving N-Queens problem using Genetic Algorithms
1 Introduction

The N-Queens problem is a classical AI problem. Its name is derived from the allowed moves for the queen piece in chess. Queens are allowed to move horizontally, vertically, or diagonally, backward and forward, with the only restriction being that they can move in only one direction at a time. A queen that can reach another piece in one move captures it.

The N-Queens problem is based on the notion of trying to place N queens on an N x N grid, such that no queen will be able to capture any other queen. The N-queens problem is typical of many combinatorial problems, in that it is simple to state and relatively easy to solve for small N, but becomes difficult with a large N. There are few ways to solve the N-queens problem. Some of them are trying all the permutations, using backtracking methods, using reinforcement learning methods, and etc. In this project, genetic algorithm will be used to solve this problem by using GAlib package.

Genetic Algorithms are adaptive methods which may be used to solve search and optimization problems. They are based on the genetic processes of biological organisms. Over many generations, natural populations evolve according to the principles of natural selection and "survival of the fittest". By mimicking this process, genetic algorithms are able to "evolve" solutions to real world problems, if they have been suitably encoded.

Genetic Algorithms use a direct analogy of natural behavior. They work with a population of "individuals", each representing a possible solution to a given problem. Each individual is assigned a "fitness score" according to how good a solution to the problem it is. The highly fit individuals are given opportunities to "reproduce", by "cross breeding" with other individuals in the population. This produces new individuals known as "offsprings", which share some features taken from each "parent". The least fit members of the population are less likely to get selected for reproduction, and so will

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Because genetic algorithms produce generalized solutions, they are best used as aids or guides to human decision makers instead of substitutes for them.…

    • 932 Words
    • 4 Pages
    Satisfactory Essays
  • Powerful Essays

    Fitness describes the capability of an individual species of a certain genotype to reproduce, and is usually equal to…

    • 1777 Words
    • 8 Pages
    Powerful Essays
  • Satisfactory Essays

    Corey Camel Case Study

    • 547 Words
    • 3 Pages

    Problem Statement: Corey the Camel has a small banana grove in the desert, her harvest this year was 3,000 bananas. The market where Corey sells her bananas is 1,000 miles away. Corey has to walk to the market to sell her bananas, for each mile Corey walks, she eats one banana. Corey can only carry 1,000 bananas at a time. In this POW the goal is to find the number of bananas that Corey can get to the market.…

    • 547 Words
    • 3 Pages
    Satisfactory Essays
  • Better Essays

    Genes are traits that give living things their own certain characteristic. Genes are inherited from the P generation to the F1 generation. As genes are passed down, they are given traits that are either contain all dominant genes known as homozygous dominant, or both dominant and recessive also known as heterozygous and last is homozygous recessive, meaning that the genes are both recessive. Dominant alleles are always present even if they also contain one recessive and the only way to express the recessive trait, both alleles must be recessive for the trait to be expressed. During sexual reproduction, 2 parents with different traits are crossbreed, which encourage cultural diversity out of the population. The offspring of the P1 generation is also call the hybrid since they have a mixed of traits from both parents. There are 2 type of crossbreeding first is…

    • 2413 Words
    • 10 Pages
    Better Essays
  • Good Essays

    Assignment 3

    • 1286 Words
    • 10 Pages

    Interpretation: This table gives us the optimal values of fleet size we should consider to solve the problem. Using the manual analysis we already know that the only possible cases are 3 and 4 respectively. But case 3 is most optimal because profit is maximized in it( 290) while in case 4( 215).…

    • 1286 Words
    • 10 Pages
    Good Essays
  • Powerful Essays

    The basic idea of natural selection is that a population of organisms can change over the generations if individuals having certain heritable traits leave more offspring than other individuals. The result of natural selection is evolutionary adaptation, a prevalence of inherited characteristics that enhance organisms’ survival and reproduction in specific environments.…

    • 4601 Words
    • 19 Pages
    Powerful Essays
  • Good Essays

    Chem 8.06

    • 553 Words
    • 3 Pages

    -Genetic engineering is an area in biotechnology that induces cell alterations in any kind of organism. It is based on artificial manipulation and transfer of genetic material from one organism to another. Basically the cells coded in with the new genetic information will pass those selected traits on to their offspring. Genetic combinations might be useful but not often found in nature. Genetic engineering now a days, is used in medicine to produce insulin and growth hormones, for those who lack it. The genes in humans are isolated using enzymes produced by bacteria which cleave DNA at specific base pairs, and then inserted into a a virus. The virus then is inserted into the bacteria DNA, ten the bacteria produces the hormones, which are then collected and given to patients who most need them. The hope for genetic engineering is soon a cure can be found for diseases by either inserting a corrected gene or even performing a genetic surgery. Currently many pregnant women like to have the fetuses screened for genetic defects so it can allow them and there physician to prepare for the arrival of the child who may need to have special needs.…

    • 553 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    As a result of natural selection, a population—a group of individuals of the same species living in the same place at the same time—can change over generations. Natural selection leads to evolutionary adaptation, a population’s increase in the frequency of traits suited to the environment (Simon, Reece, Dickey, 2010).…

    • 1065 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    Charles Darwin's theory of evolution by natural selection suggest that the physical environment exerts selective pressure upon adaptive characteristics, which are traits that increase the survival potential of an individual because they enable them to better adapt to their ecological niche. The adaptive traits are genetically transmitted (inherited) because the individual survives to reproduce and this is known as 'survival of the fittest', where fitness is measured by the number of genes present in the next generation.…

    • 371 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Genetically Modified Organisms (GMO), are organisms whose genetic material has been artificially manipulated in a laboratory through the means of Genetic Engineering. It is when a gene from one organism is taken and inserted into another in order to improve and produce a desired trait for that certain organism. Sometimes it is known as "transgenic" for transfer of genes.…

    • 480 Words
    • 2 Pages
    Good Essays
  • Better Essays

    Science and technology is used for genetic diversity, selective breeding is used especially in farming for livestock. Selective breeding means artificial selection means the controlled breeding of animals or plants by humans so only individuals with specific characteristics can reproduce. Farmers use this technique to get the best quality cattle and produce from the animals they have. To get the best animal possible, for example a milk cow, the farmer will select the best cows from the heard to breed from, these may be the ones with the largest udders or biggest milk yield, he will then breed from this animal, and the F1 offspring will be raised and used for milk. In the F1 generation he will do the same again, selecting the best cows from the generation, the F2 generation will have the most favourable characteristics and will have lost any of the unfavourable characteristics as they have been bread out of…

    • 1261 Words
    • 6 Pages
    Better Essays
  • Good Essays

    Genetic engineering (GE) is also known, as genetic modification is the process of organisms that are genetically modified. In this process the goal is to transfer new DNA to an organism so it can improve its habits and make new cells.…

    • 791 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Red Queen Quotes

    • 878 Words
    • 4 Pages

    The story’s initial problem is when Mare is forced to become princess after the queen discovers she has special abilities, like the silvers. As soon as Mare meets the queen she begins to think, “She’s a Silver, I can’t talk to her that way. She could put me in the stocks, take away my rations, punish me, punish my family. No, I realize in my growing horror. She’s the queen. She could just kill me. She could kill us…

    • 878 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Evolution is basically the change in the heritable characteristic or traits in living organisms which are passed from one generation to another and gives rise to diversity at every stage of the organism’s biological organisation. The process of evolution was not well understood until 19th century when Charles Darwin proposed the scientific theory of natural selection as a driving tool in evolution. The process involved both the macroevolution in which organisms went through major evolutionary changes over a long period of time and acquired different traits from different parents or ancestries and the microevolution in which a group of organisms went through minimal changes with time but the traits they acquired were typically from the same ancestor.…

    • 630 Words
    • 3 Pages
    Good Essays
  • Good Essays

    In the 1800’s, well-known biologist, Charles Darwin enlightened us with his theory of evolution and natural selection. In short, natural selection states that random genetic changes transpire within an organism 's genetic code, such changes are preserved because they are valuable for survival. Darwin’s ideas came from economics applied to biology. By the late 1800’s Francis Galton, Darwin’s cousin, had thoroughly studied his cousins findings and disclosed his beliefs in biology, which he related to human beings. His philosophy was known as Eugenics.…

    • 686 Words
    • 3 Pages
    Good Essays

Related Topics