Remote agent: Difference between revisions
m
added a blank line
No edit summary |
m (added a blank line) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1:
This is a set of three tasks revolving around the concept of a 'remote agent.' The overarching theme of the task set is to have a simple, stateful world with an agent that operates on the world's state until the end conditions are met. The world is a grid of colored squares, and is populated to some percentage by colored balls. The ending condition is when all balls are in a square of the correct color. The perspective of the agent is limited; it is not given an overview of the world. It only knows its surroundings by responses to its actions. Read on below for a complete description of the virtual world, interface commands and stream protocol.
Line 9 ⟶ 5:
# [[Remote agent/Agent interface|Implement the agent side of the stream interface in a manner idiomatic to the language]].
# [[Remote agent/Agent logic|Use the agent stream interface to satisfy the end conditions]].
Here is a description of the world and commands. The stream protocol below should be common among all implementations; any agent interface implementation should work equally well with any of the world simulation implementations.
Line 43 ⟶ 40:
* While the distribution and location of the color properties is undefined, there must not be more balls of a color than there are sectors with that color property.
* There must be at least one 'space' sector without a ball in it. (The agent does not initialize while holding a ball.)
* There may be 'wall' sectors within the area (including on the interior side of the outermost rim), but
== Goal ==
Line 120 ⟶ 117:
= Stream Protocol =
The stream protocol is simple. Every command is a single byte sent from the agent to the simulator, no line feed, no carriage return. Every event is a single byte sent from the simulator to the agent, no line feed, no carriage return. For the sake of simplicity, all bytes fall within the range of
== Greeting ==
Line 134 ⟶ 131:
== Commands and event codes ==
{| class="wikitable"
|-
|name||type||character||decimal||hex
|-
|
|-
|turn right||command||>||62||0x3E
|-
|turn left||command||<||60||0x3C
|-
|get||command|||@||64||0x40
|-
|drop||command||!||33||0x21
|-
|game over||event||+||43||0x2B
|-
|stop||event||.||46||0x2E
|-
|
|-
|color green||event||G||71||0x47
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|}
|