diff --git a/.gitignore b/.gitignore index 72f06fe9..85125a56 100644 --- a/.gitignore +++ b/.gitignore @@ -181,4 +181,6 @@ branches Branches Experiments/exp1 Experiments/exp2 +Experiments/exp3/*.joblib +Experiments/exp3/*.yaml tests/sweepparameters/*.yaml diff --git a/Experiments/exp3/Check-Simulations_CLI.py b/Experiments/exp3/Check-Simulations_CLI.py new file mode 100755 index 00000000..104148d6 --- /dev/null +++ b/Experiments/exp3/Check-Simulations_CLI.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +# By Le Chen and Chatgpt +# chenle02@gmail.com / le.chen@auburn.edu +# Created at Thu 01 Feb 2024 01:43:11 PM CST +# + +import argparse +from tetris_ballistic.tetris_ballistic import Tetris_Ballistic +import joblib + + +def load_tetris_simulation(width, piece_id, sticky, nonsticky, seed): + joblib_filename = f"./config_Piece-{piece_id}_sticky={nonsticky}-{sticky}_w={width}_seed={seed}.joblib" + TB = Tetris_Ballistic.load_simulation(joblib_filename) + print(f"Now the slopes are: \n {TB.log_time_slopes}") + print(f"This is for the simulation: {joblib_filename}") + TB.Substrate2PNG(envelop=True, show_average=True) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Load Tetris Ballistic Simulation.') + + parser.add_argument('-w', '--width', type=int, required=True, help='Width of the grid') + parser.add_argument('-p', '--piece_id', type=int, required=True, help='ID of the piece') + parser.add_argument('-st', '--sticky', type=int, required=True, help='Sticky values as two integers') + parser.add_argument('-ns', '--nonsticky', type=int, required=True, help='Sticky values as two integers') + parser.add_argument('-s', '--seed', type=int, required=True, help='Seed for the simulation') + + args = parser.parse_args() + + TB2 = load_tetris_simulation(width=args.width, + piece_id=args.piece_id, + sticky=args.sticky, + nonsticky=args.nonsticky, + seed=args.seed) diff --git a/Experiments/exp3/frame_25922.png b/Experiments/exp3/frame_25922.png new file mode 100644 index 00000000..186d082a Binary files /dev/null and b/Experiments/exp3/frame_25922.png differ diff --git a/Experiments/exp3/frame_29928.png b/Experiments/exp3/frame_29928.png new file mode 100644 index 00000000..45adcc35 Binary files /dev/null and b/Experiments/exp3/frame_29928.png differ diff --git a/Experiments/exp3/frame_3034.png b/Experiments/exp3/frame_3034.png new file mode 100644 index 00000000..bb12aef9 Binary files /dev/null and b/Experiments/exp3/frame_3034.png differ diff --git a/Experiments/exp3/frame_35622.png b/Experiments/exp3/frame_35622.png new file mode 100644 index 00000000..f6a546d1 Binary files /dev/null and b/Experiments/exp3/frame_35622.png differ diff --git a/Experiments/exp3/frame_4357.png b/Experiments/exp3/frame_4357.png new file mode 100644 index 00000000..9c8f7f27 Binary files /dev/null and b/Experiments/exp3/frame_4357.png differ diff --git a/Experiments/exp3/frame_4451.png b/Experiments/exp3/frame_4451.png new file mode 100644 index 00000000..392acde3 Binary files /dev/null and b/Experiments/exp3/frame_4451.png differ diff --git a/Experiments/exp3/frame_4554.png b/Experiments/exp3/frame_4554.png new file mode 100644 index 00000000..6f8bb653 Binary files /dev/null and b/Experiments/exp3/frame_4554.png differ diff --git a/Experiments/exp3/frame_4733.png b/Experiments/exp3/frame_4733.png new file mode 100644 index 00000000..05f1dd6c Binary files /dev/null and b/Experiments/exp3/frame_4733.png differ diff --git a/Experiments/exp3/frame_4763.png b/Experiments/exp3/frame_4763.png new file mode 100644 index 00000000..9a26bd0b Binary files /dev/null and b/Experiments/exp3/frame_4763.png differ diff --git a/Experiments/exp3/frame_4934.png b/Experiments/exp3/frame_4934.png new file mode 100644 index 00000000..b854fa2d Binary files /dev/null and b/Experiments/exp3/frame_4934.png differ diff --git a/Experiments/exp3/frame_4967.png b/Experiments/exp3/frame_4967.png new file mode 100644 index 00000000..353c5c4d Binary files /dev/null and b/Experiments/exp3/frame_4967.png differ diff --git a/Experiments/exp3/frame_8320.png b/Experiments/exp3/frame_8320.png new file mode 100644 index 00000000..01df68bc Binary files /dev/null and b/Experiments/exp3/frame_8320.png differ