Skip to content

Commit

Permalink
additional limitation on add strategy usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Clinton Sheppard committed Apr 23, 2012
1 parent cb35b8f commit 0846a4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strategies.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (solver *Solver) add(strategy strategyInfo, numberOfGenesPerChromosome int,

for {
if !solver.isHillClimbing ||
random.Intn(100) != 0 {
numberOfGenesPerChromosome > 1 && random.Intn(100) != 0 {
select {
case <-solver.quit:
solver.quit <- true
Expand Down

0 comments on commit 0846a4e

Please sign in to comment.