Skip to content

Commit

Permalink
Add code embedder
Browse files Browse the repository at this point in the history
  • Loading branch information
kvankova committed Oct 29, 2024
1 parent 1e7bc6e commit fa35ef1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/code-embedding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Code Embedder

on:
push:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.ref }}
- name: Embed Code
uses: kvankova/code-embedder@v0.3.0
env:
GITHUB_TOKEN: ${{ secrets.CODE_EMBEDDER }}
19 changes: 1 addition & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,7 @@ that has the signature explained in sections down below.

### Usage Example (🤸 Gymnasium)
The example loop for running the game looks like this
```python
import gymnasium as gym

from generals.agents import RandomAgent, ExpanderAgent

# Initialize agents
agent = RandomAgent()
npc = ExpanderAgent()

# Create environment
env = gym.make("gym-generals-v0", agent=agent, npc=npc, render_mode="human")

observation, info = env.reset()
terminated = truncated = False
while not (terminated or truncated):
action = agent.act(observation)
observation, reward, terminated, truncated, info = env.step(action)
env.render()
```python:examples/gymnasium_example.py
```

> [!TIP]
Expand Down

0 comments on commit fa35ef1

Please sign in to comment.