#!/bin/sh

advanced=''

if [ $1 = -a ]
then
	shift
	advanced='a'
fi

expanded=$1
players=$2

name=$expanded.$players$advanced

rm -f rftg.$name.out

ulimit -c unlimited

for i in `seq 1 250`
do
	date
	factor=100
	if [ $i -gt 100 ]
	then
		factor=1
	fi
	promo=''
#	if [ `expr $i % 2` = 1 ]
#	then
#		promo=-o
#	fi
	advopt=''
	if [ "$advanced" = a ]
	then
		advopt=-a
	fi
	opts="-e $1 -p $2 -f $factor -c $promo $advopt -v"

	./learner $opts >> rftg.$name.out

	./dumpnet network/rftg.eval.$name.net > netdump/eval.$name.$i.dump
	echo $i
done
