From e6ec7c041c3f03ba9d7165eeda699c95e4bcc913 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 22 Jan 2020 11:23:16 -0800 Subject: [PATCH] updates --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 97bbc773..be92c514 100644 --- a/train.py +++ b/train.py @@ -448,7 +448,7 @@ if __name__ == '__main__': # Select parent(s) parent = 'single' # parent selection method: 'single' or 'weighted' x = np.loadtxt('evolve.txt', ndmin=2) - n = min(3, len(x)) # number of previous results to consider + n = min(5, len(x)) # number of previous results to consider x = x[np.argsort(-fitness(x))][:n] # top n mutations if parent == 'single' or len(x) == 1: x = x[random.randint(0, n - 1)] # select one of the top n