Skip to content

Solving 8-Queens problem using Simulated Annealing method (Python 3.6)

License

Notifications You must be signed in to change notification settings

Goktug/8queens-simulated-annealing-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Solving 8-Queens problem using Simulated Annealing method

The process involves::

  1. Randomly move or alter the state
  2. Assess the energy of the new state using an objective function
  3. Compare the energy to the previous state and decide whether to accept the new solution or reject it based on the current temperature.
  4. Repeat until you have converged on an acceptable answer

For a move to be accepted, it must meet one of two requirements

  • The move causes a decrease in state energy (i.e. an improvement in the objective function)
  • The move increases the state energy (i.e. a slightly worse solution) but is within the bounds of the temperature. The temperature exponetially decreases as the algorithm progresses. In this way, we avoid getting trapped by local minima early in the process but start to hone in on a viable solution by the end.

About

Solving 8-Queens problem using Simulated Annealing method (Python 3.6)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages