Commit aec8ff65 authored by Matthew Hausknecht's avatar Matthew Hausknecht

Added parameters for controlling ball initialization.

parent 6b3a6405
...@@ -50,6 +50,8 @@ def main(args): ...@@ -50,6 +50,8 @@ def main(args):
'server::hfo_max_trials=%i server::hfo_max_frames=%i ' \ 'server::hfo_max_trials=%i server::hfo_max_frames=%i ' \
'server::hfo_offense_on_ball=%i server::random_seed=%i ' \ 'server::hfo_offense_on_ball=%i server::random_seed=%i ' \
'server::hfo_max_untouched_time=%i ' \ 'server::hfo_max_untouched_time=%i ' \
'server::hfo_min_ball_pos_x=%f ' \
'server::hfo_max_ball_pos_x=%f ' \
'server::say_msg_size=%i' \ 'server::say_msg_size=%i' \
%(server_port, coach_port, olcoach_port, %(server_port, coach_port, olcoach_port,
args.logging, args.logging, args.logging, args.logging, args.logging, args.logging,
...@@ -57,7 +59,7 @@ def main(args): ...@@ -57,7 +59,7 @@ def main(args):
args.sync, args.fullstate, args.fullstate, args.sync, args.fullstate, args.fullstate,
args.maxFramesPerTrial, args.numTrials, args.numFrames, args.maxFramesPerTrial, args.numTrials, args.numFrames,
args.offenseOnBall, args.seed, args.maxUntouchedTime, args.offenseOnBall, args.seed, args.maxUntouchedTime,
args.messageSize) args.min_ball_x, args.max_ball_x, args.messageSize)
# server::record_messages=on -- useful for debug # server::record_messages=on -- useful for debug
try: try:
# Launch the Server # Launch the Server
...@@ -146,6 +148,10 @@ def parseArgs(): ...@@ -146,6 +148,10 @@ def parseArgs():
help='Seed the server\'s RNG. Default: time.') help='Seed the server\'s RNG. Default: time.')
p.add_argument('--message-size', dest='messageSize', type=int, default=1000, p.add_argument('--message-size', dest='messageSize', type=int, default=1000,
help='Message size limit for communication') help='Message size limit for communication')
p.add_argument('--ball-x-min', dest='min_ball_x', type=float, default=0.0,
help='Ball initialization min x position: [0,1]. Default: 0')
p.add_argument('--ball-x-max', dest='max_ball_x', type=float, default=0.2,
help='Ball initialization max x position: [0,1]. Default: .2')
args = p.parse_args() args = p.parse_args()
if args.offenseAgents not in xrange(0, 11): if args.offenseAgents not in xrange(0, 11):
p.error('argument --offense-agents: invalid choice: '\ p.error('argument --offense-agents: invalid choice: '\
......
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