Skip to content

Commit

Permalink
0.1.4 - ConnectX Release
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjeffries committed Jan 3, 2020
1 parent 0386e96 commit 4a41b5a
Show file tree
Hide file tree
Showing 11 changed files with 2,879 additions and 13 deletions.
17 changes: 17 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore

node_modules
#!include:.gitignore
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# [<img src="https://kaggle.com/static/images/site-logo.png" height="50" style="margin-bottom:-15px" />](https://kaggle.com) Environments

> **ALPHA RELEASE** - Breaking changes may be introduced!
```bash
pip install kaggle-environments
```

**BETA RELEASE** - Breaking changes may be introduced!

## TLDR;

```python
Expand Down
12 changes: 6 additions & 6 deletions kaggle_environments/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,22 +272,22 @@ def train(self, agents=[]):
Example:
env = make("tictactoe")
# Training agent in first position (player 1) against the default random agent.
reset, step = env.train([None, "random"])
trainer = env.train([None, "random"])
obs = reset()
obs = trainer.reset()
done = False
while not done:
action = 0 # Action for the agent being trained.
obs, reward, done, info = step(action)
obs, reward, done, info = trainer.step(action)
env.render()
Args:
agents (list): List of agents to obtain actions from while training.
The agent to train (in position), should be set to "None".
Returns:
`tuple`[0]: Reset def that reset the environment, then advances until the agents turn.
`tuple`[1]: Steps using the agent action, then advance until agents turn again.
`dict`.reset: Reset def that reset the environment, then advances until the agents turn.
`dict`.step: Steps using the agent action, then advance until agents turn again.
"""
position = None
for index, agent in enumerate(agents):
Expand Down Expand Up @@ -319,7 +319,7 @@ def step(action):

reset()

return (reset, step)
return structify({"step": step, "reset": reset})

@property
def name(self):
Expand Down
Loading

0 comments on commit 4a41b5a

Please sign in to comment.