-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
from decks import genome_to_decklist, write_decklist | ||
from fitness import evaluate_deck_by_wins | ||
from logger import log_experiment | ||
from mail import send_mail | ||
|
||
creator.create("FitnessMax", base.Fitness, weights=(1.0,)) | ||
creator.create("Individual", list, fitness=creator.FitnessMax) | ||
|
@@ -127,4 +128,9 @@ def main(): | |
log_experiment(top_list, median_list, worst_list, global_maximum, runtime, alpha_deck) | ||
|
||
if __name__ == '__main__': | ||
main() | ||
try: | ||
main() | ||
except Exception as e: | ||
print("Unexpected error:\n{}".format(e)) | ||
send_mail(['[email protected]', '[email protected]'], "The program has crashed:\n{}".format(e)) | ||
|