some english notes on the purpose of batch sizes and the beginning of a worker thread implementation
This commit is contained in:
@@ -3,13 +3,17 @@
|
||||
namespace genetic {
|
||||
|
||||
template <class T> struct Strategy {
|
||||
// The recommended number of threads is <= number of cores on your pc.
|
||||
// Set this to -1 use the default value (number of cores - 1)
|
||||
int num_threads; // Number of worker threads that will be evaluating cell fitness
|
||||
int num_cells; // Size of the population pool
|
||||
int num_threads; // Number of worker threads that will be evaluating cell
|
||||
// fitness.
|
||||
int num_retries; // Number of times worker threads will try to grab work pool
|
||||
// lock before sleeping
|
||||
int batch_size; // Number of cells a worker thread tries to evaluate in a row
|
||||
// before locking the pool again. 1 tends to be fine
|
||||
int num_cells; // Size of the population pool
|
||||
int num_generations; // Number of times (epochs) to run the algorithm
|
||||
bool test_all; // Sets whether or not every cell is tested every generation
|
||||
float test_chance; // Chance to test any given cell's fitness. Relevant only if test_all is false.
|
||||
bool test_all; // Sets whether or not every cell is tested every generation
|
||||
float test_chance; // Chance to test any given cell's fitness. Relevant only
|
||||
// if test_all is false.
|
||||
|
||||
// User defined functions
|
||||
T (*make_default_cell)();
|
||||
|
||||
Reference in New Issue
Block a user