Commit ec99d4cb authored by Matthew Hausknecht's avatar Matthew Hausknecht

Added port option for example agents.

parent 49a8dccf
......@@ -16,12 +16,16 @@ Action get_random_high_lv_action() {
return act;
}
int main() {
int main(int argc, char** argv) {
int port = 6000;
if (argc > 1) {
port = atoi(argv[1]);
}
// Create the HFO environment
HFOEnvironment hfo;
// Connect to the agent's server on port 6000 and request low-level
// 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
for (int episode=0; ; episode++) {
status_t status = IN_GAME;
......
......@@ -38,12 +38,16 @@ Action get_random_low_lv_action() {
return act;
}
int main() {
int main(int argc, char** argv) {
int port = 6000;
if (argc > 1) {
port = atoi(argv[1]);
}
// Create the HFO environment
HFOEnvironment hfo;
// Connect to the agent's server on port 6000 and request low-level
// 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
for (int episode=0; ; episode++) {
status_t status = IN_GAME;
......
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