Run main_webserver.py and it should work. Switch the agent in config.py AIConfig.ai_python_class to be the FastDownwardPlanningAgent agent, like:Īi_python_class = 'FastDownwardPlanningAgent'
#Dungeon crawl stone soup trunk install
Install and run the fastdownward plannerĭownload and compile the fastdownward planner and put it in a folder under dcss-ai-wrapper so the folder structure looks like this:ĭcss-ai-wrapper/FastDownward/fast-downward.py Recommended next step: install FastDownward planner to run the FastDownwardPlanningAgent. tutorial_number = 1 # create game game = WebSockGame ( config = my_config, agent_class = MyAgent ) game. choice ( actions ) def main (): my_config = WebserverConfig # set game mode to Tutorial #1 my_config. get_all_move_commands () # call your planner or policy instead of random: return random. gamestate = gamestate # get all possible actions actions = Action. gamestate = None def get_action ( self, gamestate : GameState ): self. Quickest way to use APIĮxample usage to create your own agent and run it: from import BaseAgent from import GameState from import Action from dcss.websockgame import WebSockGame from import WebserverConfig import random class MyAgent ( BaseAgent ): def _init_ ( self ): super (). Now you're all set to go with the SimpleRandomAgent being able to play the game! The rest of this README file contains additional details on using the DCSS AI Wrapper. You will now be spectating the agent, for example: Wait for the agent to get past the character creation menus (there's a strange bug that appears if you spectate too early - this should only take a few seconds), then click on the agent's name, which in this case is 'midca'. Within 1-2 seconds you should see the agent show up in the lobby of the web browser, something like this: Now you can run your agent by running main_webserver.py: python main_webserver.py You will spectate the agent without logging in yourself. Note: Do not login on the browser yourself, creating the account is so that the agent in the API can connect and play. Open your browser to to the DCSS browser interface, which should look like:Ĭlick on the 'Register' button and create an account with the following values:īy default you'll be logged in on the browser but it's recommended for you to be logged out so go ahead and click the 'Logout' button. Now you can leave the docker alone, as long as it keeps running agents can connect and play the game. Now launch the webserver from within the docker interactive shell by first activate python: cd /dcss/crawl/crawl-ref/source/webserver Run the docker and open an interactive shell docker run -it -p 8080:8080 b3d5cdf181b8 Pull a pre-made docker image with the DCSS webserver installed (if you'd like to create your own docker or install DCSS yourself, see instructions below): docker pull dtdannen34/dcss-ai-wrapper Then to install all packages into this virtualenv: pip install -r requirements.txt If you'd like to contribute to the research effort aligned with this project, see Research Effort and Roadmap Development CommunityĬheckout the YouTube channel for live coding streams and tutorial videos (more content to come soon): QuickstartĬreate a virtualenv and install packages python3 -m venv. If you use this repository in your research, please cite the above paper. Thirty-Third AAAI Conference on Artificial Intelligence. Workshop on Games and Simulations for Artificial Intelligence. Dungeon Crawl Stone Soup as an Evaluation Domain for Artificial Intelligence. This effort started with the following paper:ĭannenhauer, D., Floyd, M., Decker, J., Aha D. (Demo of an agent taking random actions to play DCSS in the terminal) Aboutĭcss-ai-wrapper is an API for Dungeon Crawl Stone Soup for Artificial Intelligence research. (Demo of an agent taking random actions to play DCSS in the browser using the docker container running a DCSS webserver instance)