shortdeck1.0

This commit is contained in:
2025-09-30 18:09:49 +08:00
commit ee95b8e049
24 changed files with 532 additions and 0 deletions

23
shortdeck_arena/main.py Normal file
View File

@@ -0,0 +1,23 @@
from __future__ import annotations
from pathlib import Path
from .agent import HumanAgent, RandomAgent
from .simulation import Simulation
def main():
agents = [HumanAgent(0), RandomAgent(1)]
sim = Simulation(agents)
print("Player cards:")
for i in range(len(agents)):
print(i, sim.player_cards(i))
print("Random agent acting...")
agents[1].try_act(sim)
print("History:", sim.history)
sim.dump_data(Path.cwd() / "shortdeck_arena_history.jsonl")
if __name__ == "__main__":
main()