-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
56 lines (41 loc) · 1.38 KB
/
justfile
File metadata and controls
56 lines (41 loc) · 1.38 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
default:
just --list
simtest *args:
uv tool run maturin develop --release -F bench
uv run python/scripts/sim.py {{args}}
test test="":
uv tool run maturin develop -F debug
RUST_BACKTRACE=1 uv run pytest -n 8 --no-header --assert=plain --tb=short {{test}}
test-release test="":
uv tool run maturin develop -F debug --release
RUST_BACKTRACE=1 uv run pytest -n 8 --no-header --assert=plain --tb=short {{test}}
build_date := `date +player_%H_%M_%S`
build name=build_date:
# build shared library for current environment
uv run cargo build --release
rm -rf ./build/{{name}}
mkdir -p ./build/{{name}}
cp ./target/release/libalpha_snake.dylib ./build/{{name}}/alpha_snake.so
cp ./python/player/*.py ./build/{{name}}/
echo "Built controller {{name}}"
run playera playerb map="cage":
cp -r ./python/game ./python/scripts
uv tool run maturin develop --release
uv run python/scripts/run_game.py --a_name {{playera}} --b_name {{playerb}} --map_name {{map}}
train:
uv tool run maturin develop -F train --release
uv run python/scripts/train.py
genetic:
uv tool run maturin develop -F train --release
uv run python/scripts/genetic.py
vis:
uv run vis.py
tensorboard:
uvx tensorboard --logdir logs/
weights:
rm -rf weights/
uv run python/scripts/weights.py
cargo fmt
benchgen:
uv tool run maturin develop -F serde --release
uv run python/scripts/benchgen.py