Skip to content

Commit

Permalink
Fix Copybara import conflicts (#295)
Browse files Browse the repository at this point in the history
* Move workflow back to root; update vcpkg baselines

* Add reminder to update requirements

* Remove outdated instruction for macOS

* Update vcpkg baselines (boost 1.76 -> 1.77)

* Fix typos in observation.md
  • Loading branch information
vi3itor authored Sep 29, 2021
1 parent f11f14f commit cc196f7
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 28 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ gfootball.egg-info
football-env*
.vs
.idea
dist/
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: microsoft/vcpkg
ref: 47d2378c8181ece05ffc51acd2ed60d97e3c9a64
ref: 8e0a801c6253a2c8e81f59427a4a5d66f10c0ca4
path: vcpkg
fetch-depth: 0

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
third_party/gfootball_engine/build*
build/
gfootball.egg-info
*.egg-info
__pycache__
*.a
*.so
Expand All @@ -16,3 +16,4 @@ cmake-build-debug/
.idea
.vs
vcpkg_installed/
dist/
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ should not change, as modifications made to the environment are either
new features or backward compatible bug fixes. We will maintain vX branches
pointing at the most recent vX.Y.

v2.10.1
- Improve crash reporting in the engine.
- Update environment tests.

v2.10
- Windows support.
- Development mode (pip install -e .)
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ brew install git python3 cmake sdl2 sdl2_image sdl2_ttf sdl2_gfx boost boost-pyt

python3 -m pip install --upgrade pip setuptools psutil wheel
```
To set up `pygame`, it is also required to install older versions of SDL:

```
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
```

#### Windows
Install [Git](https://git-scm.com/download/win) and [Python 3](https://www.python.org/downloads/).
Expand Down
10 changes: 5 additions & 5 deletions gfootball/doc/observation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Environment exposes following `raw` observations:
- `left_team_direction` - N-elements vector with [x, y] movement vectors of players.
- `left_team_tired_factor` - N-elements vector of floats in the range {0..1}. 0 means player is not tired at all.
- `left_team_yellow_card` - N-elements vector of integers denoting number of yellow cards a given player has (0 or 1).
- `left_team_active` - N-elements vector of Bools denoting whether a given player is playing the game (False means player got a red card).
- `left_team_active` - N-elements vector of booleans denoting whether a given player is playing the game (False means player got a red card).
- `left_team_roles` - N-elements vector denoting roles of players. The meaning is:
- `0` = e_PlayerRole_GK - goalkeeper,
- `1` = e_PlayerRole_CB - centre back,
Expand Down Expand Up @@ -63,7 +63,7 @@ Environment exposes following `raw` observations:
- Screen:
- `frame` - three vectors of RGB pixels representing rendered
screen. It is only exposed when rendering is enabled (`render` flag). Size
of each vector is weight by height of the rendered window, 1280 by 720 by default.
of each vector is width by height of the rendered window, 1280 by 720 by default.

Where `N` is the number of players on the team.

Expand Down Expand Up @@ -115,7 +115,7 @@ player is less than 11) are set to -1.

### `extracted` (aka SMMWrapper)

Simplified spacial (minimap) representation of a game state. It consists of
Simplified spatial (minimap) representation of a game state. It consists of
several 72 * 96 planes of bytes, filled in with 0s except for:

* 1st plane: 255s represent positions of players on the left team
Expand Down Expand Up @@ -148,7 +148,7 @@ The default action set consists of 19 actions:

* Idle actions

* `action_idle` = 0, a no-op action, stickly actions are not affected (player maintains his directional movement etc.).
* `action_idle` = 0, a no-op action, sticky actions are not affected (player maintains his directional movement etc.).

* Movement actions

Expand Down Expand Up @@ -181,4 +181,4 @@ The default action set consists of 19 actions:

It is an extension of the default action set:

* `action_builtin_ai` = 19, let game's built-in AI generate an action
* `action_builtin_ai` = 19, let game's built-in AI generate an action.
10 changes: 9 additions & 1 deletion gfootball/env/football_env_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import gfootball
import os
import platform
import sys
import random
import threading
import atexit
Expand Down Expand Up @@ -268,7 +269,14 @@ def test___render(self):
# Linux
expected_hash_value = 4000732293
if platform.system() == 'Windows':
expected_hash_value = 683941870
# On Windows we may have to check four possible values:
# for each of architectures (32 or 64 bits)
# what SDK was used (latest or from Visual Studio 2017)
# We will check only two values once we start using windows-latest VM again
if sys.maxsize > 2 ** 32: # x64
expected_hash_value = 683941870 if hash_value != 3676773624 else 3676773624
else: # x86
expected_hash_value = 1490754124 if hash_value != 2808421794 else 2808421794
elif platform.system() == 'Darwin':
expected_hash_value = 1865563121
self.assertEqual(hash_value, expected_hash_value)
Expand Down
7 changes: 0 additions & 7 deletions gfootball/requirements.txt

This file was deleted.

8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# If you change any of the requirements here please don't forget to change them in setup.py too
pygame>=1.9.6
opencv-python
psutil
scipy
gym>=0.11.0
absl-py
wheel
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def run_windows(self):

setup(
name='gfootball',
version='2.10',
version='2.10.1',
description=('Google Research Football - RL environment based on '
'open-source game Gameplay Football'),
long_description=('Please see [our GitHub page](https://github.com/google-research/football) '
Expand All @@ -138,6 +138,7 @@ def run_windows(self):
license='Apache 2.0',
packages=packages,
package_dir={'gfootball_engine': 'third_party/gfootball_engine'},
# If you change the requirements here please don't forget to change the requirements.txt too
install_requires=[
'pygame>=1.9.6',
'opencv-python',
Expand Down
4 changes: 2 additions & 2 deletions third_party/gfootball_engine/vcpkg_manifests/py3.6/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gfootball-engine",
"version-string": "2.10",
"builtin-baseline": "47d2378c8181ece05ffc51acd2ed60d97e3c9a64",
"version-string": "2.10.1",
"builtin-baseline": "8e0a801c6253a2c8e81f59427a4a5d66f10c0ca4",
"dependencies": [
"python3",
"boost-thread",
Expand Down
4 changes: 2 additions & 2 deletions third_party/gfootball_engine/vcpkg_manifests/py3.7/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gfootball-engine",
"version-string": "2.10",
"builtin-baseline": "47d2378c8181ece05ffc51acd2ed60d97e3c9a64",
"version-string": "2.10.1",
"builtin-baseline": "8e0a801c6253a2c8e81f59427a4a5d66f10c0ca4",
"dependencies": [
"python3",
"boost-thread",
Expand Down
4 changes: 2 additions & 2 deletions third_party/gfootball_engine/vcpkg_manifests/py3.8/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gfootball-engine",
"version-string": "2.10",
"builtin-baseline": "47d2378c8181ece05ffc51acd2ed60d97e3c9a64",
"version-string": "2.10.1",
"builtin-baseline": "8e0a801c6253a2c8e81f59427a4a5d66f10c0ca4",
"dependencies": [
"python3",
"boost-thread",
Expand Down
4 changes: 2 additions & 2 deletions third_party/gfootball_engine/vcpkg_manifests/py3.9/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gfootball-engine",
"version-string": "2.10",
"builtin-baseline": "47d2378c8181ece05ffc51acd2ed60d97e3c9a64",
"version-string": "2.10.1",
"builtin-baseline": "8e0a801c6253a2c8e81f59427a4a5d66f10c0ca4",
"dependencies": [
"python3",
"boost-thread",
Expand Down

0 comments on commit cc196f7

Please sign in to comment.