- 2024-03-07PokéLLMon 源码解析(二)
.\PokeLLMon\poke_env\environment\double_battle.py#从logging模块中导入Logger类fromloggingimportLogger#从typing模块中导入Any,Dict,List,Optional,Union类型fromtypingimportAny,Dict,List,Optional,Union#从poke_env.environment.abstract
- 2024-03-07PokéLLMon 源码解析(三)
.\PokeLLMon\poke_env\environment\move_category.py#导入需要的模块fromenumimportEnum,auto,unique#定义一个枚举类MoveCategory,表示一个移动类别@uniqueclassMoveCategory(Enum):"""Enumeration,representamovecategory."""#定
- 2024-03-07PokéLLMon 源码解析(四)
.\PokeLLMon\poke_env\exceptions.py"""Thismodulecontainsexceptions."""#定义一个自定义异常类ShowdownException,继承自内置异常类ExceptionclassShowdownException(Exception):"""Thisexceptionisraisedwhena
- 2024-03-07PokéLLMon 源码解析(五)
.\PokeLLMon\poke_env\player\player.py"""Thismoduledefinesabaseclassforplayers."""importasyncioimportrandomfromabcimportABC,abstractmethodfromasyncioimportCondition,Event,Queue,Semaphorefromlogg
- 2024-03-07PokéLLMon 源码解析(六)
.\PokeLLMon\poke_env\teambuilder\teambuilder_pokemon.py"""ThismoduledefinestheTeambuilderPokemonclass,whichisusedasanintermediateformattospecifypokemonbuildsinteambuilderscustomclasses."""#导入必要的模块
- 2024-03-07PokéLLMon 源码解析(一)
.\PokeLLMon\poke_env\concurrency.py#导入必要的模块importasyncioimportatexitimportsysfromloggingimportCRITICAL,disablefromthreadingimportThreadfromtypingimportAny,List#在新线程中运行事件循环def__run_loop(loop:asyncio.AbstractEventLo