forked from leochartrand/TetrisAI.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
usage.jl
36 lines (25 loc) · 928 Bytes
/
usage.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
usage.jl
This is a script that provides an example of the current way to import and use the TetrisAI package in a script.
Of course, if the project is deployed to the Julia hub, using the package manager directly in the script won't
be necessary.
It can also be used as a conveniance script, as sometimes it's a bit cumbersome to manually start up a Julia
interactive session and run the commands you want manually. You can copy and customize this script to your
own needs and you can start it up with just the following line:
julia usage.jl
"""
using Pkg
# Activate the current project.
Pkg.activate(".")
# Precompile the package.
println("Precompiling...")
Pkg.precompile()
println("Precompiling DONE.")
print("Importing TetrisAI")
t = @elapsed begin
using TetrisAI
end
################################
# Write your TetrisAI code below
demo_id = "DQN-Feature-Extraction-Final" # PPO-Final
model_demo(demo_id)