64 lines
1.5 KiB
Plaintext
64 lines
1.5 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"%load_ext autoreload\n",
|
|
"%autoreload 2\n",
|
|
"from primaite.game.session import PrimaiteSession\n",
|
|
"\n",
|
|
"from primaite import _PRIMAITE_CONFIG, PRIMAITE_PATHS\n",
|
|
"import logging\n",
|
|
"_PRIMAITE_CONFIG['log_level']=logging.DEBUG\n",
|
|
"print(PRIMAITE_PATHS.app_log_dir_path)\n",
|
|
"import itertools\n",
|
|
"from primaite.game.session import PrimaiteSession\n",
|
|
"from primaite.simulator.sim_container import Simulation\n",
|
|
"from primaite.game.agent.interface import AbstractAgent\n",
|
|
"from primaite.simulator.network.networks import arcd_uc2_network\n",
|
|
"import yaml\n",
|
|
"\n",
|
|
"with open('example_config.yaml', 'r') as file:\n",
|
|
" cfg = yaml.safe_load(file)\n",
|
|
"sess = PrimaiteSession.from_config(cfg)\n",
|
|
"sess.step()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"for i in range(50):\n",
|
|
" sess.step()"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "venv",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.10.12"
|
|
},
|
|
"orig_nbformat": 4
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|