Comments (5)
Built-in AI (who plays when you specify empty string as a player) does not get "observations" in the usual sense and does not use "actions". So you cannot extract that.
However if you specify any other player, like "bot" (for this you need fix from #40), then you can extract that information.
Does it answer your question?
from football.
Ok, I see. Thanks for your reply
What I am trying to do is extract clips from the game, together with a log of the actions that the players are executing (those defined as sticky but also the others).
For what concerns the clips generation I have successfully extracted them by taking the frame
from here
football/gfootball/env/football_env_core.py
Line 192 in 0f09bcb
On the other hand, I have seen that by adding sticky=True
to the definitions of the CoreAction
s, strating here
I should be able to expose "non-sticky actions" via the
observation
struct.
What I am wondering now is whether the game played by bots
is varied enough or whether it will give often similar games.
from football.
Some of the possible actions are sticky, which means that they can be active for some time after execution (e.g. until cancellation) - such an action is for example game_left
. See also README. So I guess you don't want to change some actions to being or not being sticky.
What you could do to register actions, is to inject some code to FootballEnv, where is the code to gather the actions and get observations; see here: https://github.com/google-research/football/blob/master/gfootball/env/football_env.py#L122
As for the last question, the game itself is not deterministic in the standard scenarios, so you would get some variation from there; however bots (defined in bot.py) are very simple and deterministic. You can see for yourself by using play_game script with bots players as bot and watching some games.
from football.
Actually, I should've mentioned one more thing. When you run play_game script, dumps are written after episodes (these are pickled observations, debug info etc).
When you unpickle such a file, for every timestep you have a dictionary d
, and in it you can access d['debug']['action']
.
By default, dumps are written to tmp/dumps
.
from football.
Marking this issues as closed, please reopen if some more clarification / followup is needed.
from football.
Related Issues (20)
- Problems about the agent-action mapping in some scenarios
- I can't run "python3 -m pip install ." HOT 1
- can't access the link website https://research-football.dev/ HOT 1
- Why Ronaldo isnβt winning World Cup?
- Error message while running
- Is there anyway to disable the rendering of the mini map?
- Error while installing HOT 5
- Installation problem with gfootball on Python 3.10 Conda environment HOT 1
- Running problem
- How can solve RuntimeError: Dynamic linking causes SDL downgrade! (compiled with version 2.28.3, linked to 2.0.16)? HOT 1
- ImportError: /../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found HOT 2
- Rendering frame by frame (Headless: on a server without desktop)
- error: subprocess-exited-with-error python setup.py egg_info did not run successfully.
- Saving replay by rendering failed
- Football
- Football dates
- ImportError: /lib/x86_64-linux-gnu/libwayland-client.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0
- Colab example
- working on small issues
- Error on colab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from football.