-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
60 lines (49 loc) · 2.26 KB
/
Copy pathsetup.ps1
File metadata and controls
60 lines (49 loc) · 2.26 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
57
58
59
60
# RAPCG-MetaRL Setup Script for Windows PowerShell
# Run this script to set up the project environment
Write-Host "=" -NoNewline -ForegroundColor Cyan
Write-Host ("=" * 59) -ForegroundColor Cyan
Write-Host "RAPCG-MetaRL Setup" -ForegroundColor Green
Write-Host "=" -NoNewline -ForegroundColor Cyan
Write-Host ("=" * 59) -ForegroundColor Cyan
# Check Python version
Write-Host "`nChecking Python version..." -ForegroundColor Yellow
python --version
# Create virtual environment (optional)
$createVenv = Read-Host "`nCreate virtual environment? (y/n)"
if ($createVenv -eq 'y') {
Write-Host "Creating virtual environment..." -ForegroundColor Yellow
python -m venv pcg_env
Write-Host "Activating virtual environment..." -ForegroundColor Yellow
.\pcg_env\Scripts\Activate.ps1
}
# Install requirements
Write-Host "`nInstalling Python dependencies..." -ForegroundColor Yellow
pip install -r requirements.txt
# Install gym-pcgrl
Write-Host "`nInstalling gym-pcgrl..." -ForegroundColor Yellow
Set-Location gym-pcgrl
pip install -e .
Set-Location ..
# Create necessary directories
Write-Host "`nCreating directories..." -ForegroundColor Yellow
New-Item -ItemType Directory -Force -Path logs | Out-Null
New-Item -ItemType Directory -Force -Path checkpoints | Out-Null
New-Item -ItemType Directory -Force -Path generated_levels | Out-Null
# Run tests
Write-Host "`nRunning tests..." -ForegroundColor Yellow
python test\test.py
Write-Host "`n" -NoNewline
Write-Host "=" -NoNewline -ForegroundColor Cyan
Write-Host ("=" * 59) -ForegroundColor Cyan
Write-Host "Setup Complete!" -ForegroundColor Green
Write-Host "=" -NoNewline -ForegroundColor Cyan
Write-Host ("=" * 59) -ForegroundColor Cyan
Write-Host "`nNext steps:" -ForegroundColor Yellow
Write-Host " 1. Train a model:" -ForegroundColor White
Write-Host " python train.py --game zelda --timesteps 50000" -ForegroundColor Gray
Write-Host " 2. Generate levels:" -ForegroundColor White
Write-Host " python inference.py checkpoints/*/final_model.zip" -ForegroundColor Gray
Write-Host " 3. Run quick start:" -ForegroundColor White
Write-Host " python quickstart.py" -ForegroundColor Gray
Write-Host "`nFor help with any script, use --help flag:" -ForegroundColor Yellow
Write-Host " python train.py --help" -ForegroundColor Gray