-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.