Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
sotetsuk committed Jul 27, 2023
1 parent 6fed677 commit 649f6cf
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,2 @@
<p align="center">
<img src="assets/logo.svg" width="60%">
</p>

<p align="center">
<img src="assets/go_dark.gif" width="30%"><img src="assets/go_dark.gif" width="30%" style="transform:rotate(270deg);"><img src="assets/go_dark.gif" width="30%">
</p>

# Pgx Documentation


```py
import jax
import pgx

env = pgx.make("go_19x19")
init = jax.jit(jax.vmap(env.init))
step = jax.jit(jax.vmap(env.step))

batch_size = 1024
keys = jax.random.split(jax.random.PRNGKey(42), batch_size)
state = init(keys) # vectorized states
while not (state.terminated | state.truncated).all():
action = model(state.current_player, state.observation, state.legal_action_mask)
state = step(state, action) # state.reward (2,)
```
--8<-- "README.md"

0 comments on commit 649f6cf

Please sign in to comment.