X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=main.py;h=11eb8fd90053e07d156a53cdc3f57cf62c50562d;hb=5c5668b0e52e2ae579d49ba8a44fafe2339ad8c0;hp=55379652a8766a72fa8b20035d4176702f791251;hpb=525bd24014786b53638dea78cfb88035a2b99d97;p=culture.git diff --git a/main.py b/main.py index 5537965..11eb8fd 100755 --- a/main.py +++ b/main.py @@ -95,6 +95,16 @@ parser.add_argument("--accuracy_to_make_c_quizzes", type=float, default=0.975) parser.add_argument("--dirty_debug", action="store_true", default=False) +parser.add_argument("--sky_height", type=int, default=6) + +parser.add_argument("--sky_width", type=int, default=8) + +parser.add_argument("--sky_nb_birds", type=int, default=3) + +parser.add_argument("--sky_nb_iterations", type=int, default=2) + +parser.add_argument("--sky_speed", type=int, default=3) + ###################################################################### args = parser.parse_args() @@ -222,9 +232,15 @@ assert args.nb_train_samples % args.batch_size == 0 assert args.nb_test_samples % args.batch_size == 0 if args.problem == "sky": - problem = (sky.Sky(height=6, width=8, nb_birds=3, nb_iterations=2, speed=2),) + problem = sky.Sky( + height=args.sky_height, + width=args.sky_width, + nb_birds=args.sky_nb_birds, + nb_iterations=args.sky_nb_iterations, + speed=args.sky_speed, + ) elif args.problem == "wireworld": - problem = wireworld.Wireworld(height=10, width=15, nb_iterations=4) + problem = wireworld.Wireworld(height=8, width=10, nb_iterations=2, speed=5) else: raise ValueError @@ -418,9 +434,9 @@ def create_c_quizzes( for n in range(nb_correct.max() + 1): recorded[n].append(new_c_quizzes[nb_correct == n].clone()) - log_string( - f"keep c_quizzes {nb_validated()*100/nb_generated():.02f}% kept total {nb_validated()} / {nb_to_create}" - ) + nv = [recorded[n][-1].size(0) for n in recorded.keys()] + + log_string(f"keep c_quizzes kept {nv} total {nb_validated()} / {nb_to_create}") # concatenate and shuffle for n in recorded.keys():