<commit_before>#/bin/bash

# Specify paper/hyperparameters
if [ -z "$1" ]; then
  echo "Please enter paper, e.g. ./run nature"
  echo "Choices: nature|doubleq|duel|prioritised|persistent|bootstrap"
  echo "Alternative choice: demo (for Catch)"
  exit 0
fi

# Specify game
if [ "$1" != "demo" ] && [ -z "$2" ]; then
  echo "Please enter game, e.g. ./run nature breakout"
  exit 0
fi

# Reassign and remove first 2 arguments from $@
PAPER=$1
GAME=$2
shift
shift

if [ "$PAPER" == "demo" ]; then
  # Catch demo
  th main.lua -optimiser adam -steps 500000 -learnStart 10000 -tau 4 -memSize 10000 -epsilonSteps 10000 -valFreq 10000 -valSteps 6000 -bootstraps 0 -PALpha 0 "$@"
elif [ "$PAPER" == "nature" ]; then
  # Nature
  th main.lua -game $GAME -duel false -bootstraps 0 -memPriority none -epsilonEnd 0.1 -tau 10000 -doubleQ false -PALpha 0 -eta 0.00025 -gradClip 0 "$@"
elif [ "$PAPER" == "doubleq" ]; then
  # Double-Q (tuned)
  th main.lua -game $GAME -duel false -bootstraps 0 -memPriority none -PALpha 0 -eta 0.00025 -gradClip 0 "$@"
elif [ "$PAPER" == "duel" ]; then
  # Duel (eta is apparently lower but not specified in paper; unclear whether DDQN or tuned DDQN parameters are used)
  th main.lua -game $GAME -bootstraps 0 -memPriority none -PALpha 0 -eta 0.00025 "$@"
elif [ "$PAPER" == "prioritised" ]; then
  # Prioritised
  th main.lua -game $GAME -duel false -bootstraps 0 -PALpha 0 -gradClip 0 "$@"
elif [ "$PAPER" == "persistent" ]; then
  # Persistent
  th main.lua -game $GAME -duel false -bootstraps 0 -memPriority none -epsilonEnd 0.1 -tau 10000 -doubleQ false -eta 0.00025 -gradClip 0 "$@"
elif [ "$PAPER" == "bootstrap" ]; then
  # Bootstrap
  th main.lua -game $GAME -duel false -memPriority none -tau 10000 -PALpha 0 -eta 0.00025 -gradClip 0 "$@"
fi<commit_msg>Fix run.sh for demo options<commit_after>#/bin/bash

# Specify paper/hyperparameters
if [ -z "$1" ]; then
  echo "Please enter paper, e.g. ./run nature"
  echo "Choices: nature|doubleq|duel|prioritised|persistent|bootstrap"
  echo "Alternative choice: demo (for Catch)"
  exit 0
else
  PAPER=$1
  shift
fi

# Specify game
if [ "$PAPER" != "demo" ]; then
  if [ -z "$1" ]; then
    echo "Please enter game, e.g. ./run nature breakout"
    exit 0
  else
    GAME=$2
    shift
  fi
fi

if [ "$PAPER" == "demo" ]; then
  # Catch demo
  th main.lua -optimiser adam -steps 500000 -learnStart 10000 -tau 4 -memSize 10000 -epsilonSteps 10000 -valFreq 10000 -valSteps 6000 -bootstraps 0 -PALpha 0 "$@"
elif [ "$PAPER" == "nature" ]; then
  # Nature
  th main.lua -game $GAME -duel false -bootstraps 0 -memPriority none -epsilonEnd 0.1 -tau 10000 -doubleQ false -PALpha 0 -eta 0.00025 -gradClip 0 "$@"
elif [ "$PAPER" == "doubleq" ]; then
  # Double-Q (tuned)
  th main.lua -game $GAME -duel false -bootstraps 0 -memPriority none -PALpha 0 -eta 0.00025 -gradClip 0 "$@"
elif [ "$PAPER" == "duel" ]; then
  # Duel (eta is apparently lower but not specified in paper; unclear whether DDQN or tuned DDQN parameters are used)
  th main.lua -game $GAME -bootstraps 0 -memPriority none -PALpha 0 -eta 0.00025 "$@"
elif [ "$PAPER" == "prioritised" ]; then
  # Prioritised
  th main.lua -game $GAME -duel false -bootstraps 0 -PALpha 0 -gradClip 0 "$@"
elif [ "$PAPER" == "persistent" ]; then
  # Persistent
  th main.lua -game $GAME -duel false -bootstraps 0 -memPriority none -epsilonEnd 0.1 -tau 10000 -doubleQ false -eta 0.00025 -gradClip 0 "$@"
elif [ "$PAPER" == "bootstrap" ]; then
  # Bootstrap
  th main.lua -game $GAME -duel false -memPriority none -tau 10000 -PALpha 0 -eta 0.00025 -gradClip 0 "$@"
fi
{'fraction_non_alphanumeric': 0.1401006711409396, 'fraction_numerical': 0.058165548098434, 'mean_word_length': 3.320048309178744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7328178', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1291, 'n_words': 465}