Commit 6b033a2c authored by Matthew Hausknecht's avatar Matthew Hausknecht

Updated Readme.

parent d10baeaa
...@@ -6,31 +6,30 @@ RoboCup 2D Half Field Offense ...@@ -6,31 +6,30 @@ RoboCup 2D Half Field Offense
[Half Field Offense in RoboCup 2D Soccer](http://www.cs.utexas.edu/~AustinVilla/sim/halffieldoffense/) is a subtask in RoboCup simulated soccer, modeling a situation in which the offense of one team has to get past the defense of the opposition in order to shoot goals. This repository offers the ability to quickly and easily interface your learning agent with the HFO domain. [Half Field Offense in RoboCup 2D Soccer](http://www.cs.utexas.edu/~AustinVilla/sim/halffieldoffense/) is a subtask in RoboCup simulated soccer, modeling a situation in which the offense of one team has to get past the defense of the opposition in order to shoot goals. This repository offers the ability to quickly and easily interface your learning agent with the HFO domain.
## Dependencies ## Dependencies
- [rcssserver-15.2.2](http://sourceforge.net/projects/sserver/files/rcssserver/15.2.2/) - Boost-system, filesystem
- If `configure` fails to detect boost libraries, set the configure flag `--with-boost-libdir=your_boost_path` - Flex
- If `make` encounters [lex errors](http://sourceforge.net/p/sserver/discussion/76439/thread/5b13cac6/), ensure you have [bison 2.7.1](http://www.gnu.org/software/bison/) installed. - Qt4 [Optional]: Required for SoccerWindow2 visualizer. To skip add cmake flag `-DBUILD_SOCCERWINDOW=False`.
- Only run single-threaded make. Multi-threaded make (eg `make -j4`) fails.
- [librcsc-4.1.0](http://en.sourceforge.jp/projects/rctools/downloads/51941/librcsc-4.1.0.tar.gz/)
- [soccerwindow2-5.1.0](http://en.sourceforge.jp/projects/rctools/downloads/51942/soccerwindow2-5.1.0.tar.gz/) (Optional)
- If -laudio is not found during make, it can be safely removed from the link command.
## Install ## Install
1. Edit the `LIBRCSC_INCLUDE`/`LIBRCSC_LINK` variables in `CMakeLists.txt` to point to your librcsc include/lib directories. ```
2. `cmake .` mkdir build && cd build
3. `make` cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4
## Patch rcssserver make install
By default if your agent takes longer then two seconds to select an action it will be disconnected from the server. To enable longer wait times, apply the following patch and rebuild your rcssserver: ```
`patch your_path/rcssserver-15.2.2/src/stadium.cpp < stadium.patch`
## Example Agents ## Example Agents
Example C++ and Python agents are provided in the `example` directory. Example C++ and Python agents are provided in the `example` directory.
## Run ## Demo
To start the HFO server run: `./bin/start.py` then start an example agent: `./example/hfo_example_agent` or start them both at the same time: Start a simple 1v1 game played by Agent2D:
`./bin/start.py --offense-npcs=1 --defense-npcs=1`
`(./bin/start.py &) && ./example/hfo_example_agent` Start an example agent on the empty goal task. First start the server:
`./bin/start.py --offense-agents=1 &` and then connect the agent:
`./example/hfo_example_agent`.
Or do both in a single command:
`(./bin/start.py --offense-agents=1 &) && ./example/hfo_example_agent`
## Documentation ## Documentation
The state and action spaces provided by the HFO domain are documented in the [manual](doc/manual.pdf). The state and action spaces provided by the HFO domain are documented in the [manual](doc/manual.pdf).
\ No newline at end of file
...@@ -22,7 +22,7 @@ int main() { ...@@ -22,7 +22,7 @@ int main() {
// Get the vector of state features for the current state // Get the vector of state features for the current state
const std::vector<float>& feature_vec = hfo.getState(); const std::vector<float>& feature_vec = hfo.getState();
// Create a dash action // Create a dash action
Action a = {DASH, 0.0, 0.0}; Action a = {DASH, 20.0, 0.0};
// Perform the dash and recieve the current game status // Perform the dash and recieve the current game status
status = hfo.act(a); status = hfo.act(a);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment