open-source-ideas / ideas

💡 Looking for inspiration for your next open source project? Or perhaps you've got a brilliant idea you can't wait to share with others? Open Source Ideas is a community built specifically for this! 👋
6.55k stars 221 forks source link

Shattered Pixel Dungeon - based online AI game for programmers #164

Open KOLANICH opened 5 years ago

KOLANICH commented 5 years ago

Project description

Shattered Pixel Dungeon is a roguelike game based on Pixel Dungeon. It is a singleplayer PvE. Though its monsters are dumb and the main challenge of the game is resources scarcity and unhappy random.

I wonder what if inhabit the dungeon not with monsters, but with AI bots by programmers. A programmer creates an account, then a program interacts to the server via API. This is vital - a player should be able to use neural nets and collect the info. The bot gets information about the environment within the sight. All the info about other players is visible, except items in inventory other than worn. The character lives in the environment, has to get food and other resources in order not to die. When a character kills another one, it gets items from its inventory, though character's inventory is limited. Eventually even tanks die because resources are limited and "free" resources are got only on entering depth 0. Amount of time player is alive is used to calculate players ratings.

Why Shattered and not vanilla one? Shattered has artifacts, and these artifacts were used to hack the game balance multiple times. Like using ethereal chains + scroll of magic mapping to get into the rooms player doesn't have a key, sparing some times of walking the level or combination of chalice of blood (regen boost) + horn of plenty (free food) + garden room (regen boost + partial invis) to overcome hunger mechanics (making a player vigorously go forward, otherwise it will starve to death) or cloak of shadows (invis) + horn of plenty with the same purpose. I wonder if RL can find and exploit these kind of imbalances.

There are challenges:

Ideas:

Relevant Technology

Other games for programmers.

Complexity and required time

Complexity

Required time (ETA)

remram44 commented 5 years ago

I wonder what if inhabit the dungeon not with monsters, but with AI bots by programmers

To be clear, you are replacing the monsters by AI programs, or the players? Are there still human players involved?

There are plenty of AI games out there, and I'm not sure what this one adds. The fact that it has no clear ending is a problem. The fact that it's turn-based is also not good (takes a long time to go through a full turn, (num players * action timeout)). A game where every program acts simultaneously would be a lot more suitable

I'm also not sure what the MMO setting improves. Having programs duel instead would yield a clearer leaderboard.

KOLANICH commented 5 years ago

To be clear, you are replacing the monsters by AI programs, or the players? Are there still human players involved?

No and yes. Yes: it is possible to write a GUI interacting to API. Playing this GUI may give bots developers better insight of the game. No: the game is not meant to be played this way. The game is not meant to be interesting for human players emulating bots. A human cannot play 24/7 occupying its place in the leaderboard.

The fact that it has no clear ending is a problem.

Why is it a problem?

The fact that it's turn-based is also not good (takes a long time to go through a full turn, (num players * action timeout)).

It is not a turn based in the sense that all actors do the actions simultaneously. All the actions are done simultaneously. Turns (in the sense game stops) are only for visualization purposes. The only exception are fights in which actions are ordered, but again IMHO it is more for human player convenience, otherwise it would be hard to figure out what had happenned. IMHO this ordering can be removed in bot-controlled setting.

Though there are time quanta and I don't know any computer-implemented games simulating actions in space-time without that. Let's call these quanta turns. In automated setting I guess it is possible to require all the bots to respond within certain interval of time, if a bot fails to do it, it loses its turn; bots losing turns will be soon killed by alive bots.

Having programs duel instead would yield a clearer leaderboard.

Having programs duel will mean they will be unable to cooperate with each other.

remram44 commented 5 years ago

The fact that it has no clear ending is a problem.

It's a problem because you can't easily rank players and give a clear leaderboard. If you compare to Robocode, rpscontest, the leaderboard is kind of the main event. I am not sure what incentive you can offer bot-makers. If using a single persistent world, the fact that you can simply run thousands of bots is also a deep design flaw that you probably won't get rid of.

It is not a turn based in the sense that all actors do the actions simultaneously.

That would solve it, however this is not how Pixel Dungeon works. In Pixel Dungeon, you move and then monsters make a move; it only appears simultaneous because the computer-controller monsters act so fast, but it is indeed turn based. This means that, in its current form, an AI can only decide on its move once it is its turn. This is a huge problem that you can't solve without changing the game a fair bit.

See video: https://www.youtube.com/watch?v=IkSNmW8C_Bc