#!/bin/bash # Define the number of problems for each split declare -A split_counts=( ["bio_pop_growth"]=24 ["chem_react"]=36 ["matsci"]=25 ["phys_osc"]=44 ) declare -A split_problem_dir_prefixes=( ["bio_pop_growth"]="BPG" ["chem_react"]="CRK" ["matsci"]="MatSci" ["phys_osc"]="PO" ) base_problems_dir="./problems" echo "Starting all experiments..." for split_name in "${!split_counts[@]}"; do count=${split_counts[$split_name]} problem_dir_prefix=${split_problem_dir_prefixes[$split_name]} # Check if a prefix is defined (it can be an empty string if paths are like "split_name/0/") if [ -z "$problem_dir_prefix" ] && [ "${split_problem_dir_prefixes[$split_name]+_}" != "_" ]; then # This means the key exists but the value is an empty string, which is allowed. : # Do nothing, empty prefix is fine. elif [ -z "$problem_dir_prefix" ]; then echo "" echo "Warning: No problem directory prefix defined for split '$split_name' in 'split_problem_dir_prefixes'. Skipping this split." continue fi echo "" echo "----------------------------------------------------" echo "Processing Split: $split_name" echo "Number of problems: $count" echo "Problem directory prefix: '$problem_dir_prefix'" # Prefix like CRK, BPG, etc. echo "Expected problem path structure: $base_problems_dir/$split_name/${problem_dir_prefix}[ID]/" echo "----------------------------------------------------" # Loop from problem_id 0 to count-1 for (( i=0; i