From 1a747e08fcf72b6b5c41c7beeb794b2c13561d83 Mon Sep 17 00:00:00 2001 From: Wok Date: Sun, 27 May 2018 12:43:49 +0200 Subject: [PATCH] Export the most important functions to the top-level namespace --- README.md | 8 ++++---- puissance4/__init__.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 969ef19..b62327b 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,10 @@ pip install puissance4 - Pour jouer vous-même contre une intelligence artificielle UCT d'un bon niveau, importez le paquet PyPI depuis Python : ```python -import puissance4.play +import puissance4 # Play an interactive game versus UCT AI -puissance4.play.play_now() +puissance4.play_now() ``` #### Des parties IA contre IA @@ -61,13 +61,13 @@ puissance4.play.play_now() - (facultatif) Pour calibrer les paramètres de l'IA, importez le paquet PyPI depuis Python : ```python -import puissance4.training +import puissance4 # Either 'Random', 'MC', or 'UCT' trainer_choice = 'MC' # Play 200 games in a setting UCT AI vs. trainer AI -puissance4.training.prepare_and_train(trainer_choice=trainer_choice, num_parties_jouees=200) +puissance4.prepare_and_train(trainer_choice=trainer_choice, num_parties_jouees=200) ``` ## Introduction diff --git a/puissance4/__init__.py b/puissance4/__init__.py index e69de29..ed99176 100644 --- a/puissance4/__init__.py +++ b/puissance4/__init__.py @@ -0,0 +1,2 @@ +from .play import play_now +from .training import prepare_and_train