def adaptAgent(agent_klass):
 def inner(*args, **kwargs):
  return RlglueAgentAdapter(agent_klass, *args, **kwargs)
 return inner

def adaptAgent ( agent_klass ) : def inner ( * args , ** kwargs ) : return RlglueAgentAdapter ( agent_klass , * args , ** kwargs ) return inner
return a factory function that instantiates a pybrain agent and adapts it to the rlglue framework interface .