Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
Former-commit-id: 46f29ad
  • Loading branch information
daochenzha committed May 6, 2021
1 parent 34830b6 commit 25bac35
Show file tree
Hide file tree
Showing 24 changed files with 327 additions and 2,055 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ python:
- "3.6"
- "3.7"
install:
- pip install -e .[torch]
- pip install -e .[tensorflow]
- pip install -e .
- pip install torch==1.6.0
before_script:
- pip install python-coveralls
- pip install pytest-cover
Expand Down
55 changes: 0 additions & 55 deletions examples/leduc_holdem_br.py

This file was deleted.

59 changes: 0 additions & 59 deletions examples/leduc_holdem_exp.py

This file was deleted.

12 changes: 2 additions & 10 deletions rlcard/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@
reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])
installed_packages = [r.decode().split('==')[0] for r in reqs.split()]

if 'tensorflow' in installed_packages:
import tensorflow as tf
if LooseVersion(tf.__version__) < LooseVersion('1.14.0') \
or LooseVersion(tf.__version__) >= LooseVersion('2.0.0'):
print('WAINING - RLCard supports Tensorflow >=1.14 and <2.0\nThe detected version is {} \nIf the models can not be loaded, please install Tensorflow via\n$ pip install rlcard[tensorflow]\n'.format(tf.__version__))
from rlcard.agents.deep_cfr_agent import DeepCFR
from rlcard.agents.dqn_agent import DQNAgent
from rlcard.agents.nfsp_agent import NFSPAgent
if 'torch' in installed_packages:
from rlcard.agents.dqn_agent_pytorch import DQNAgent as DQNAgentPytorch
from rlcard.agents.nfsp_agent_pytorch import NFSPAgent as NFSPAgentPytorch
from rlcard.agents.dqn_agent import DQNAgent as DQNAgent
from rlcard.agents.nfsp_agent import NFSPAgent as NFSPAgent

from rlcard.agents.cfr_agent import CFRAgent
from rlcard.agents.limit_holdem_human_agent import HumanAgent as LimitholdemHumanAgent
Expand Down
Loading

0 comments on commit 25bac35

Please sign in to comment.