export CUDA_VISIBLE_DEVICES=$1
cd ../pymarl
llm_tm_index=$2
name=$3
ego_model_path=$4
tm_model_path=$5
env_idx=$6
env=$7

if [[ $env == *"lbf"* ]]; then
    j=$((llm_tm_index+4))
    python3 src/main.py --eval --config=vdn --env-config=lbf4 --seed=1 --name=$name --multi_head=True with runner=episode_xp save_replay=False evaluate=True test_nepisode=50 checkpoint_path_ego=$ego_model_path checkpoint_path_tm=$tm_model_path env_args.key="lbforaging:Foraging-8x8-2p-4f-r$j-v1" > $name.out
elif [[ $env == *"pp"* ]]; then
    python3 src/main.py --eval --config=vdn --env-config=pp --seed=1 --name=$name --multi_head=True with runner=episode_xp save_replay=False evaluate=True test_nepisode=50 checkpoint_path_ego=$ego_model_path checkpoint_path_tm=$tm_model_path env_args.key="mpe:SimpleTag-$env_idx-$llm_tm_index-v0" > $name.out
elif [[ $env == *"sc2"* ]]; then
    python3 src/main.py --eval --config=vdn --env-config=sc2_v2 --seed=1 --name=$name --multi_head=True with runner=episode_xp save_replay=False evaluate=True test_nepisode=50 checkpoint_path_ego=$ego_model_path checkpoint_path_tm=$tm_model_path env_args.env_id=$env_idx env_args.additional_reward_id=$llm_tm_index > $name.out
else
    echo "No matching pattern found in the name."
fi
