#!/bin/bash

# 定义要生成的参数组合
declare -a param_sets=(
    "n_types=2 total_length=10 to_fill_length=1"
    "n_types=3 total_length=15 to_fill_length=3"
    "n_types=4 total_length=20 to_fill_length=5"
)

# 每组生成的数据数量
NUM_OF_DATA=1000
MAX_ATTEMPTS=1000
NESTING_DEPTH=0

echo "Start to generate Dyck Language dataset..."

# 为每组参数生成数据
for params in "${param_sets[@]}"; do
    # 解析参数
    eval $params
    
    echo "Generating dataset with parameters: n_types=${n_types}, total_length=${total_length}, to_fill_length=${to_fill_length}, number=${NUM_OF_DATA}"
    
    # 运行游戏生成器
    python -m games.tasks.dyck_language.scripts.dyck_language \
        --num_of_data "$NUM_OF_DATA" \
        --max_attempts "$MAX_ATTEMPTS" \
        --n_types "$n_types" \
        --total_length "$total_length" \
        --to_fill_length "$to_fill_length"
        # --nesting_depth "$NESTING_DEPTH"
    
    echo "Dataset generated: n_types=${n_types}, total_length=${total_length}, to_fill_length=${to_fill_length}"
    
done

# 运行所有测试
echo "Running unit tests..."
python -m unittest discover tests

echo "Batch dataset generation completed!" 