Skip to content

Commit

Permalink
In the process of bach computing
Browse files Browse the repository at this point in the history
  • Loading branch information
chenle02 committed Feb 1, 2024
1 parent 3b5eed8 commit a510451
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,6 @@ branches
Branches
Experiments/exp1
Experiments/exp2
Experiments/exp3/*.joblib
Experiments/exp3/*.yaml
tests/sweepparameters/*.yaml
36 changes: 36 additions & 0 deletions Experiments/exp3/Check-Simulations_CLI.py
Original file line number Diff line number Diff line change
@@ -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)
Binary file added Experiments/exp3/frame_25922.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_29928.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_3034.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_35622.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_4357.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_4451.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_4554.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_4733.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_4763.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_4934.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_4967.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Experiments/exp3/frame_8320.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a510451

Please sign in to comment.