This guide covers installing Clojure on Windows for the Strategify "Strategy Synthesizer" layer.
winget install -e --id Oracle.JDK.21Or download manually from: https://www.oracle.com/java/technologies/downloads/
Verify:
java -versionwinget install -e --id Technomancy.LeiningenOr manually:
- Download from: https://github.com/technomancy/leiningen/releases
- Extract to
C:\leiningen - Add to PATH:
C:\leiningen\bin
Verify:
lein versionInstall Calva extension in VS Code:
- Open VS Code
Ctrl+Shift+X- Search "Calva"
- Install
strategify-clj/
├── project.clj # Leiningen config
├── src/
│ └── strategify/
│ └── core.clj # Game theory logic
└── README.md
cd D:\GitHub\projects\Strategify\strategify-clj
# REPL
lein repl
# Run
lein run
# Test
lein test- Open project in VS Code
Ctrl+Alt+CthenCtrl+Alt+Jto start REPL- Evaluate code with
Ctrl+Enter
from strategify.logic.clj import ClojureBridge
bridge = ClojureBridge()
result = bridge.execute_strategy("hawk", {"version": 0, "players": {}});; In core.clj
-:hawk (fn [state player]
(if (dominates? state player (opponent player))
:attack
:retreat))
;; Available: hawk, dove, tit-for-tat, grudger, adaptive;; Branch multiple futures
(s/branch-timelines state [:attack :display :retreat])
;; Compare outcomes
(s/compare-timelines timelines player score-fn)Add to PATH:
$env:PATH += ";C:\leiningen\bin"Kill existing REPL:
Get-Process -Name java | Stop-ProcessEdit project.clj:
:jvm-opts ["-Xmx2g"]