Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Seminar-HFO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
Seminar-HFO
Commits
b0826462
Commit
b0826462
authored
Sep 24, 2015
by
Matthew Hausknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Readme.
parent
1d2d833b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
README.md
README.md
+5
-3
No files found.
README.md
View file @
b0826462
...
@@ -36,7 +36,9 @@ Or do both in a single command:
...
@@ -36,7 +36,9 @@ Or do both in a single command:
```
```
## Example Agents
## Example Agents
Example C++ and Python agents are provided in the
`example`
directory.
Example agents are provided in the
`example`
directory. Below are two
minimal examples:
#### Example C++ Agent
#### Example C++ Agent
```
c++
```
c++
...
@@ -56,12 +58,12 @@ for (int episode=0; episode<5; episode++) {
...
@@ -56,12 +58,12 @@ for (int episode=0; episode<5; episode++) {
#### Example Python Agent
#### Example Python Agent
```
python
```
python
hfo
=
hfo
.
HFOEnvironment
()
hfo
=
hfo
.
HFOEnvironment
()
hfo
.
connectToAgentServer
(
6000
,
HFO_Features
.
HIGH
_LEVEL_FEATURE_SET
)
hfo
.
connectToAgentServer
(
6000
,
HFO_Features
.
LOW
_LEVEL_FEATURE_SET
)
for
episode
in
xrange
(
5
):
for
episode
in
xrange
(
5
):
status
=
HFO_Status
.
IN_GAME
status
=
HFO_Status
.
IN_GAME
while
status
==
HFO_Status
.
IN_GAME
:
while
status
==
HFO_Status
.
IN_GAME
:
features
=
hfo
.
getState
()
features
=
hfo
.
getState
()
status
=
hfo
.
act
((
HFO_Actions
.
DASH
,
0
,
0
))
status
=
hfo
.
act
((
HFO_Actions
.
DASH
,
20.
0
,
0
))
print
'Episode'
,
episode
,
'ended'
print
'Episode'
,
episode
,
'ended'
```
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment