Commit fb153a61 authored by Matthew Hausknecht's avatar Matthew Hausknecht

Simplify interface.

parent 19460175
...@@ -120,9 +120,6 @@ Player HFOEnvironment::playerOnBall() { ...@@ -120,9 +120,6 @@ Player HFOEnvironment::playerOnBall() {
} }
status_t HFOEnvironment::step() { status_t HFOEnvironment::step() {
assert(agent->currentTime().cycle() == current_cycle);
assert(ready_for_action);
// Execute the action // Execute the action
agent->executeAction(); agent->executeAction();
...@@ -137,16 +134,13 @@ status_t HFOEnvironment::step() { ...@@ -137,16 +134,13 @@ status_t HFOEnvironment::step() {
// Update the state features // Update the state features
agent->preAction(); agent->preAction();
assert(agent->currentTime().cycle() == (current_cycle + 1));
current_cycle = agent->currentTime().cycle(); current_cycle = agent->currentTime().cycle();
status_t status = agent->getGameStatus(); status_t status = agent->getGameStatus();
// If the episode is over, take three NOOPs to refresh state features // If the episode is over, take three NOOPs to refresh state features
if (status != IN_GAME && status != SERVER_DOWN) { if (status != IN_GAME && status != SERVER_DOWN) {
for (int i = 0; i < 3; ++i) { for (int i = 0; i < 3; ++i) {
act(NOOP); act(NOOP);
if (step() == SERVER_DOWN) { step();
return SERVER_DOWN;
}
} }
} }
return status; return status;
......
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