Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit 294da2d

Browse files
authored
Merge pull request #100 from fedden/feature/update-averaging-script-and-update-clustering
Release candidate 1.0.0
2 parents c4eb048 + b0df571 commit 294da2d

File tree

133 files changed

+3124
-5978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+3124
-5978
lines changed

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
applications
2+
assets
3+
clustering_cache
4+
docs
5+
paper
6+
poker_ai.egg-info
7+
research
8+
!research/blueprint_algo/preflop_lossless.pkl
9+
!research/blueprint_algo/flop_lossy_2.pkl
10+
!research/blueprint_algo/river_lossy_2.pkl
11+
!research/blueprint_algo/turn_lossy_2.pkl
12+
!research/size_of_problem/action_sequences.pkl
13+
tags
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see:
3+
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
4+
5+
name: Upload Python Package
6+
7+
on:
8+
release:
9+
types: [created]
10+
11+
jobs:
12+
deploy:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: '3.x'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel twine
26+
- name: Build and publish
27+
env:
28+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
29+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
30+
run: |
31+
python setup.py sdist bdist_wheel
32+
twine upload dist/*

.readthedocs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/conf.py
11+
12+
# Optionally build your docs in additional formats such as PDF
13+
formats:
14+
- pdf
15+
16+
# Optionally set the version of Python and requirements required to build your docs
17+
python:
18+
version: 3.7
19+
install:
20+
- requirements: requirements.txt

.travis.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
language: python
22

3-
# Environment variables.
4-
env:
5-
global:
6-
- CC_TEST_REPORTER_ID=607f73633cb88df8c21568f855bd394dc47772d2228b2f0476ad8c87b625a334
3+
services:
4+
- docker
75

8-
# Which version(s) of python we want to use for testing.
9-
python:
10-
- "3.7"
11-
12-
# command to install dependencies
13-
install:
14-
- pip install -r requirements.txt
15-
- pip install pytest pytest-cov
16-
- pip install .
6+
before_install:
7+
- docker build -t pokeraitest .
178

189
# Hook up code coverage in the before test script.
1910
before_script:
@@ -22,12 +13,13 @@ before_script:
2213
- ./cc-test-reporter before-build
2314

2415
# command to run test script.
25-
script: pytest
16+
script:
17+
- docker run -ti pokeraitest pytest test -v --cov-report term --cov-report xml --cov-fail-under=50 --cov=/poker_ai/poker_ai
18+
- MOST_RECENT_IMAGE=$(docker ps -a --format "{{.Image}}" | head -1)
2619

2720
# Code to run after the test script.
2821
after_script:
29-
- pytest test -v --cov-report term --cov-report xml --cov-fail-under=90 --cov=pluribus
30-
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
22+
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then docker run -ti $MOST_RECENT_IMAGE ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
3123

3224
# Alert us in slack.
3325
notifications:

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ If you want to work on the codebase, then although you don't have to, it is reco
66

77
With ssh (recommended):
88
```bash
9-
git clone [email protected]:fedden/pluribus-poker-AI.git
9+
git clone [email protected]:fedden/poker_ai.git
1010
```
1111

1212
With https:
1313
```bash
14-
git clone https://github.com/fedden/pluribus-poker-AI.git
14+
git clone https://github.com/fedden/poker_ai.git
1515
```
1616

1717
### 2. Initialise the repo with git flow
@@ -27,7 +27,7 @@ sudo apt install git-flow
2727

2828
If you are using Mac OS X, please checkout the [install instructions](https://github.com/nvie/gitflow/wiki/Mac-OS-X).
2929

30-
Now `cd` to the root of the pluribus repo.
30+
Now `cd` to the root of the poker_ai repo.
3131

3232
Run:
3333
```bash
@@ -98,4 +98,4 @@ git push origin feature/my-feature-branch-name-here --force
9898

9999
Once you have wrote your cool new feature, you'll need to make a PR. If you can write any tests to support any new features introduced, this would be very welcome. If you have any conflicts with `develop` please ensure you have rebased with `develop` as instructed in step (3).
100100

101-
Please open a pull request via the github UI and request to merge into `develop`. Once there has been a successful review of your PR, and the automated tests pass, then feel free to merge at your leisure.
101+
Please open a pull request via the github UI and request to merge into `develop`. Once there has been a successful review of your PR, and the automated tests pass, then feel free to merge at your leisure.

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM pokerai/pokerai:1.0.0rc1
2+
# Copy the requirements.
3+
COPY requirements.txt requirements.txt
4+
# Install python modules.
5+
RUN pip install -r requirements.txt
6+
# Copy everything else.
7+
COPY . /poker_ai
8+
RUN pip install -e .
9+
# Setup tests.
10+
RUN pip install pytest-cov
11+
ENV CC_TEST_REPORTER_ID=607f73633cb88df8c21568f855bd394dc47772d2228b2f0476ad8c87b625a334
12+
RUN curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13+
RUN chmod +x ./cc-test-reporter
14+
RUN ./cc-test-reporter before-build
15+
CMD ["/bin/bash"]

HISTORY.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
1.0.0rc1
2+
--------
3+
4+
* Adding script to train AI.
5+
* Adding script to cluster hands.
6+
* Adding script to RT search on top of offline strategy.
7+
* Adding Sphinx auto documentation.
8+
* Adding CLI for all key supported scripts.

LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,22 @@ an absolute waiver of all civil liability in connection with the
618618
Program, unless a warranty or assumption of liability accompanies a
619619
copy of the Program in return for a fee.
620620

621+
622+
623+
EXCEPTIONS AND ADDITIONAL PERMISSIONS
624+
625+
Indemnification
626+
627+
You hereby indemnify the licensors and authors from all liability and
628+
claims arising from your use of the licensed technology. The copyright
629+
holder, or any other party who modifies and/or conveys the Program as
630+
permitted above, will be responsible for and will indemnify and keep
631+
indemnified the authors of the Program in respect of any liability, loss,
632+
damage, cost, expense, deduction, contribution, assessment, penalty, fine,
633+
or interest arising from or made in connection with any claim arising out
634+
of the use, provision, or conveyance of the Program.
635+
636+
621637
END OF TERMS AND CONDITIONS
622638

623639
How to Apply These Terms to Your New Programs
@@ -672,3 +688,4 @@ may consider it more useful to permit linking proprietary applications with
672688
the library. If this is what you want to do, use the GNU Lesser General
673689
Public License instead of this License. But first, please read
674690
<https://www.gnu.org/licenses/why-not-lgpl.html>.
691+

ParentDockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.7
2+
RUN mkdir /poker_ai
3+
# Work from the root of the repo.
4+
WORKDIR /poker_ai
5+
# Supply '--build_arg LUT_DIR=research/blueprint_algo' here.
6+
ARG LUT_DIR
7+
# Copy pickle LUTs over.
8+
COPY "${LUT_DIR}/flop_lossy_2.pkl" .
9+
COPY "${LUT_DIR}/preflop_lossless.pkl" .
10+
COPY "${LUT_DIR}/river_lossy_2.pkl" .
11+
COPY "${LUT_DIR}/turn_lossy_2.pkl" .
12+
# Set the environment variable for the tests
13+
ENV LUT_DIR="/poker_ai"
14+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)