-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGomoku_yunqi.sh
executable file
·54 lines (42 loc) · 1.71 KB
/
Gomoku_yunqi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --array=0-199
#SBATCH --cpus-per-task=20
#SBATCH --time=24:00:00
#SBATCH --mem=6GB
#SBATCH --job-name=Gomoku
#SBATCH --mail-type=ALL
#SBATCH [email protected]
#SBATCH --output=Gomoku_%j.out
i=$((${SLURM_ARRAY_TASK_ID}+14550))
allmodels=(final final_noprune final_nodelta final_noact final_notree final_nocenter final_no2conn final_no2unc final_no3 final_no4 final_nonoise final_weight_hvd final_triangle final_drop_hvd final_drop_type final_opp final_fixed_iters final_fixed_branch final_fixed_depth final_mcts_myopic final_mcts_rand final_drop_tile final_opt_weights)
allmodels2=(final final final final final final final final final final final final final final final final final_fixed_iters final_fixed_branch final_fixed_depth mcts mcts final_drop_tile final)
alldatas=(hvh gen eye learn1 learn2 learn3 tai1 tai2 tur)
allNs=(40 40 10 50 50 50 50 40 30)
k=0
for j in 4600 9200 10350 16100 21850 27600 33350 41400; do
if [ "$j" -lt "$i" ]; then
k=$(($k+1));
else break;
fi;
done
data=${alldatas[$k]}
Nplayers=${allNs[$k]}
group=$(($i%5+1))
player=$((Nplayers-(($j-$i-1)/5)%$Nplayers-1))
l=$((22-($j-$i-1)/(5*$Nplayers)))
model=${allmodels[$l]}
model2=${allmodels2[$l]}
direc=$SCRATCH/Gomoku/${data}/${model}
module purge
module load matlab
export MATLABPATH=$MATLABPATH:$SCRATCH/Gomoku/Code:$SCRATCH/Gomoku/Code/mcs:$SCRATCH/Gomoku/Code/mcs/gls:$SCRATCH/Gomoku/Code/mcs/minq5:$direc
cd $direc
mkdir subject_${player}_group_${group}
cd subject_${player}_group_${group}
cp $direc/times.txt .
mkdir Output
rm Output/out*
echo $i $model $data $player $group
echo "Gomoku_optim_mcs($player,$group); getbestx($player,$group,'${data}','${model2}'); exit;" | matlab -nodisplay
echo "Done"