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
ec99d4cb
Commit
ec99d4cb
authored
Sep 25, 2015
by
Matthew Hausknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added port option for example agents.
parent
49a8dccf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
example/high_level_random_agent.cpp
example/high_level_random_agent.cpp
+6
-2
example/low_level_random_agent.cpp
example/low_level_random_agent.cpp
+6
-2
No files found.
example/high_level_random_agent.cpp
View file @
ec99d4cb
...
@@ -16,12 +16,16 @@ Action get_random_high_lv_action() {
...
@@ -16,12 +16,16 @@ Action get_random_high_lv_action() {
return
act
;
return
act
;
}
}
int
main
()
{
int
main
(
int
argc
,
char
**
argv
)
{
int
port
=
6000
;
if
(
argc
>
1
)
{
port
=
atoi
(
argv
[
1
]);
}
// Create the HFO environment
// Create the HFO environment
HFOEnvironment
hfo
;
HFOEnvironment
hfo
;
// Connect to the agent's server on port 6000 and request low-level
// Connect to the agent's server on port 6000 and request low-level
// feature set. See manual for more information on feature sets.
// feature set. See manual for more information on feature sets.
hfo
.
connectToAgentServer
(
6000
,
HIGH_LEVEL_FEATURE_SET
);
hfo
.
connectToAgentServer
(
port
,
HIGH_LEVEL_FEATURE_SET
);
// Play 5 episodes
// Play 5 episodes
for
(
int
episode
=
0
;
;
episode
++
)
{
for
(
int
episode
=
0
;
;
episode
++
)
{
status_t
status
=
IN_GAME
;
status_t
status
=
IN_GAME
;
...
...
example/low_level_random_agent.cpp
View file @
ec99d4cb
...
@@ -38,12 +38,16 @@ Action get_random_low_lv_action() {
...
@@ -38,12 +38,16 @@ Action get_random_low_lv_action() {
return
act
;
return
act
;
}
}
int
main
()
{
int
main
(
int
argc
,
char
**
argv
)
{
int
port
=
6000
;
if
(
argc
>
1
)
{
port
=
atoi
(
argv
[
1
]);
}
// Create the HFO environment
// Create the HFO environment
HFOEnvironment
hfo
;
HFOEnvironment
hfo
;
// Connect to the agent's server on port 6000 and request low-level
// Connect to the agent's server on port 6000 and request low-level
// feature set. See manual for more information on feature sets.
// feature set. See manual for more information on feature sets.
hfo
.
connectToAgentServer
(
6000
,
LOW_LEVEL_FEATURE_SET
);
hfo
.
connectToAgentServer
(
port
,
LOW_LEVEL_FEATURE_SET
);
// Play 5 episodes
// Play 5 episodes
for
(
int
episode
=
0
;
;
episode
++
)
{
for
(
int
episode
=
0
;
;
episode
++
)
{
status_t
status
=
IN_GAME
;
status_t
status
=
IN_GAME
;
...
...
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