Courses/CS 461/Winter 2006/Darren Iwaki/week 8
From CSWiki
< Courses | CS 461 | Winter 2006 | Darren Iwaki
[edit] Sudoku
Image:Sudo.jar
Image:Input.txt
Implemented in Java using GA (Genetic Algorithm)
Input: Program reads in a files called "input.txt" in which a Sudoku puzzle can be stored
Classes:
Image:DSoduko.java - main engine
Image:Dgameboard.java - stores a board and calculates fitness
Image:DPopulationBank.java - stores the possible chromosome strands that could be used to solve the puzzle
Fitness Algorithm
Column Penalty = duplicate in same column Row Penalty = duplicate in same row Box Penalty = duplicate in same box
Fitness = 216 - (Column Penalty + Row Penalty + Box Penalty )




