Commit 20577737 authored by UNiQ10's avatar UNiQ10

Added support for random offense player on ball

parent 5c51529a
......@@ -34,10 +34,12 @@ def main(args, team1='left', team2='right'):
if not os.path.exists(args.logDir):
os.makedirs(args.logDir)
num_agents = args.offenseAgents + args.defenseAgents
num_offense = args.offenseAgents + args.offenseNPCs
binary_dir = os.path.dirname(os.path.realpath(__file__))
server_port = args.port + num_agents
coach_port = args.port + num_agents + 1
olcoach_port = args.port + num_agents + 2
offense_on_ball = (num_offense + 1) if args.offenseOnBall else 0
serverCommand = os.path.join(binary_dir, SERVER_BIN)
serverOptions = ' server::port=%i server::coach_port=%i ' \
'server::olcoach_port=%i server::coach=1 ' \
......@@ -55,7 +57,7 @@ def main(args, team1='left', team2='right'):
args.logDir, args.logDir, args.logDir,
args.sync, args.fullstate, args.fullstate,
args.maxFramesPerTrial, args.numTrials, args.numFrames,
args.offenseOnBall, args.seed, args.maxUntouchedTime)
offense_on_ball, args.seed, args.maxUntouchedTime)
# server::record_messages=on -- useful for debug
try:
# Launch the Server
......
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