qw
dcss-ai-wrapper
qw | dcss-ai-wrapper | |
---|---|---|
11 | 5 | |
9 | 38 | |
- | - | |
9.2 | 3.7 | |
3 months ago | 3 months ago | |
Lua | Python | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
qw
-
First ranged win for qw: GrHu of Okawaru
qw is a bot by elliptic that's capable of playing and winning completely unassisted games of DCSS. It's fully written in lua and runs via a normal crawl rc. Elliptic improved qw over many years to where it has won many combos using melee with a few different gods, and has also won some 15 rune games and completed a zig. Over the past year, I've resumed qw's development to add a goal system, better travel and exploration, among other features described in qw's first official release.
-
How does the qw bot work?
Regarding the goal planning, this is rule-based as advil mentioned. The gameplan system I've recently added is meant to allow qw to be fully programmable in terms of its goals. In order to coordinate its goals with crawl's travel system, qw does build a representation of branch and level layout that it "walks" with a simple algorithm that incorporates persistently stored data about every staircase qw encounters. You can find this code in travel.lua. But there is nothing terribly sophisticated here algorithmically, since I'm trying to keep processing in qw as simple as possible to avoid lua throttling. Some day qw may become so sophisticated that I have to move it to python and talk to crawl over the webtiles WebSocket, but that would require a full rewrite and lots of new code to build a representation of crawl levels and data from the json. Hence I'm not going to do that until I feel I've reached the limit of what I can do with crawl's clua.
-
Init script API
There are a couple of examples in my rcfile that hook into crawl using c_answer_prompt() and c_message() instead of using ready(). You probably also want to check out qw.rc for examples: This is the most well-known bot that plays Crawl; it uses Crawl's Lua api.
-
The NetHack Challenge: Dungeons, Dragons, and Tourists
DCSS has been beaten by a handcrafted Lua bot, written by the (at the time) indisputably best player in the game. Unlike the approach here, it got to benefit from human expertise, and also it can only win with a very narrow set of characters. Learndb entry:
qw: A fully automated lua bot written by elliptic, with some code borrowed from parabolic and xw. The first DCSS bot to ever achieve an uninterrupted and unassisted win (see '!lg qw won 2'). Now maintained at https://github.com/crawl/qw by the DCSS devteam. See qw[2] for a summary of results.
As of 0.29-a, qw has a 0.36% winrate with GrBe with 1 win in 276 attempts. See https://crawl.dcss.io/crawl/morgue/qwqw/morgue-qwqw-20220613... and games are sometimes played on cdi. Historically its best 3-rune winrate was 15% DDFi^Makhleb, and, for 15 runes, about 1% with GrFi^TSO before the 0.28 hell rework.
Branch order: D -> Lair:8 -> Orc:3 -> D:15 -> S:5 -> Vaults:4 -> Depths:5 -> S:5 -> Vaults:5 -> Zot
On the online servers, qw plays with an extra added delay so that it doesn't use too much server CPU. Playing locally without this delay, qw is much faster.
-
RC file issue with new version of the game
I don't really know the details on this but I think the slot name got renamed, and you may want to look at the following PR for qw: https://github.com/crawl/qw/pull/3
- DCSS Python Bot (proof of concept)
-
Macros and Crawl's more advanced features
One example is the bot qw, which is written in Lua and can win Crawl without human input.
-
QW Bot - LUA errors
Elliptic isn't updating the bot any more; qw is now (semi-)maintained by the devteam at: https://github.com/crawl/qw
dcss-ai-wrapper
- Facebook AI which plays NetHack
-
Publically Exposed/Accessible Crawl Data
Another very interesting project is the dcss-ai-wrapper. Which allows you to interface crawl from a program. You can use it to do reinforcement learning or write rule based bots.
-
DCSS Python Bot (proof of concept)
Is your work related to https://github.com/dtdannen/dcss-ai-wrapper? There is a bit of academic work as well:
- Need help with what to focus my RL thesis on!
-
Is there a consensus about RL frameworks?
DCSS AI Wrapper GitHub (under heavy development at the moment) https://github.com/dtdannen/dcss-ai-wrapper
What are some alternatives?
crawl - Dungeon Crawl: Stone Soup official repository
sequell - ##crawl bot Sequell; depends on https://github.com/crawl/go-sequell
crawl-lua
machin - Reinforcement learning library(framework) designed for PyTorch, implements DQN, DDPG, A2C, PPO, SAC, MADDPG, A3C, APEX, IMPALA ...
RL-Adventure - Pytorch Implementation of DQN / DDQN / Prioritized replay/ noisy networks/ distributional values/ Rainbow/ hierarchical RL
maze - Maze Applied Reinforcement Learning Framework
nle - The NetHack Learning Environment
stable-baselines3 - PyTorch version of Stable Baselines, reliable implementations of reinforcement learning algorithms.
qw - The DCSS-playing bot qw