Skip to content

Instantly share code, notes, and snippets.

@ConnorDoyle
Last active September 27, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ConnorDoyle/1283311 to your computer and use it in GitHub Desktop.
Save ConnorDoyle/1283311 to your computer and use it in GitHub Desktop.
EnMAS Client Example
import org.enmas.pomdp.{Agent, Action, State}
import scala.util.Random
class RandomAgent extends Agent {
val random = new scala.util.Random
def name = "Random Agent"
def policy(observation: State, reward: Float) =
actions.toSeq(random nextInt actions.size)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment