MilesCranmer commited on
Commit
26dc42c
1 Parent(s): 110b26c

Better defaults

Browse files
Files changed (1) hide show
  1. paralleleureqa.jl +3 -2
paralleleureqa.jl CHANGED
@@ -5,7 +5,8 @@ const nthreads = Threads.nthreads()
5
  println("Running with $nthreads threads")
6
  const npop = 300
7
  const annealing = true
8
- const ncyclesperiteration = 3000
 
9
 
10
  function fullRun(niterations::Integer)
11
  # Generate random initial populations
@@ -27,7 +28,7 @@ function fullRun(niterations::Integer)
27
 
28
  # Migration
29
  for j=1:nthreads
30
- for k in rand(1:npop, Integer(npop/2))
31
  # Copy in case one gets used twice
32
  allPops[j].members[k] = deepcopy(bestPops.members[rand(1:size(bestPops.members)[1])])
33
  end
 
5
  println("Running with $nthreads threads")
6
  const npop = 300
7
  const annealing = true
8
+ const ncyclesperiteration = 30000
9
+ const fractionReplaced = 0.1
10
 
11
  function fullRun(niterations::Integer)
12
  # Generate random initial populations
 
28
 
29
  # Migration
30
  for j=1:nthreads
31
+ for k in rand(1:npop, Integer(npop*fractionReplaced))
32
  # Copy in case one gets used twice
33
  allPops[j].members[k] = deepcopy(bestPops.members[rand(1:size(bestPops.members)[1])])
34
  end