gitcoinco / skunkworks

experimental laboratory
64 stars 35 forks source link

Make an AI for Dark Forest that will play for me when I'm AFK. #226

Open owocki opened 3 years ago

owocki commented 3 years ago

Inspired by this twitter thread => https://twitter.com/owocki/status/1400875155304321025

I am interested to see someone out there to create an Open Source AI framework for Dark Forest with pluggable modules for things like strategy and objective evaluation, and naive defaults.

My use case for this tool would be to have an API build my empire (basically maximize my energy / silver) while I'm AFK so I dont have to check on it every 30 minutes. But there are certainly other strategies that could be built into such an AI and I am open to evaluating them!

I am willilng to pay 1.5 ETH for access to such a tool, provided it is delivered before the end of Round 6.

I will pay 1 ETH to the top tool author, and 0.5 ETH to any honorable mentions. I will payout at my total discretion.

Deliverables:

Why do this? Like many ETH comunity members, I'm convinced that an AI tool like this will exist eventually. In order to avoid such a tool falling into the wrong hands and giving them an asymmetric advantage, I think such a tool should be open source and modular so everyones on the same level playing field

For this bounty, I find myself inspired by the Starcraft II ecosystem where the AI does very manual tedious things and I as the player can focus on the macro of my economy or the micro of my troops. Watch a SCII pro match to see what I mean! Even though there are SC AIs, there is a fruitful gaming experience for Pros, AIs, and Casual/Intermediate players too.

LINKS:

MONETARY CONTRIBUTIONS FROM OTHER DARK FOREST COMMUNITY MEMBERS WELCOME. THIS IS NOT SUPPORTED ON GITCOIN YET, SO INSTEAD - TO PITCH IN SOME ETH/DAI COMMENT ON THE THREAD BELOW 👇🌱

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1.5 ETH (4024.54 USD @ $2683.03/ETH) attached to it.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1.5 ETH (4024.54 USD @ $2683.03/ETH) has been submitted by:


gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1.5 ETH (3735.50 USD @ $2474.05/ETH) has been submitted by:

  1. @18530027142
  2. @yosandi26
  3. @amadm22

@owocki please take a look at the submitted work:


gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 265 years, 4 months from now. Please review their action plans below:

1) 18530027142 has started work.

测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试 2) yosandi26 has started work.

What should I do? and I'm ready to give my best advice for you 3) evanmays has started work.

Going to make a plugin that expands the empire in an automated way. It probably won't be able to deal with conflict but will keep chugging along and try. Kind of like automatic cruise control. not sure if I'm going to go the alphago route or stockfish route yet but will livestream on twitch tomorrow as I make it http://twitch.tv/evanmays 4) amadm22 has started work.

hopefully it will be useful for poor people like me and those who are there 5) dogpool has started work.

1) Will use multiple existing plugins such as attack, wage war. 2) After enough energy, and planets are gained, will enable the hideSmallPlanets plugin. 3) Bot will attack big planets, there will be a systematic introduction of hideSmallPlanets plugin as a function, so that eventually the medium size planets are too small to be attacked. 4) Bot will take over/ 6) latias7 has started work.

ya mungkin bila nanti kita kan bertemu lagi

Learn more on the Gitcoin Issue Details page.

owocki commented 3 years ago

@dogpool @evanmays looks like youre the two who are seriously working on this. excited to work with u!

evanmays commented 3 years ago

Can see my code here https://github.com/evanmays/fkbot

not done yet but some d_fdao folks are helping out

owocki commented 3 years ago

oooh this is a nice start @evanma :)

dogpool commented 3 years ago

Added you to my private repo, @evanmays as well. I already had a code that farmed xdai while I was playing Dark forest, I'm working on implementing this to the ai bot. Currently I am in step 4/10. I am integrating war pluging and optimizing silver withdrawals or upgrades for the bot on newly conquered planets. I can skip these steps and release a much simpler bot that does not upgrade or withdraw silver from space holes like you mentioned in the gitcoin thread, doing this is the time consuming part unfortunately.

dogpool commented 3 years ago

The process I am taking an my timeline: Current progress: STEP 1 B4 Step 1, (A1) Integrate xDai-df farmer plugin, allowing the bot to earn more xDai, (Bot self sufficiency). Step 1, (B1) Create or find existing plugin for extracting silver out of newly conquered planets. (To ensure bot can earn silver) Step 1 (B2) Modify SilverXTR (Silver Extract) plugin to maximize/optimize which planet the extracted silver will be sent to. (Therefore the silver is not wasted, is always used to upgrade optimal planets) Step 1 (B3) Integrate autoSilverUPGRD plugin with SilverXTR, this is a checkpoint system to ensure there bot is constantly using the silver Step 1 (B4) SilverMAXIM create a new plugin that automates what to do after planet is fully upgraded. (This is when the bot will use EITHER easyEXIT plugin to extract silver from a space time hole OR SilverSURFER to find optimal planets that need silver for upgrades in the planets range. SilverSURFER will have to work with SilverXTRv2 in order to choose which planet is the best one to upgrade. Step 1 (B5) SilverMIGRATE plugin will be created. (I am thinking this will create a series of transactions/ a route for the bot to follow in order to get to a planet that is outside it's current range. Therefore even planets that are outside the range of a silver harvesting planet, they will be sent to the target planet by using SilverMIGRATE route optimization, using minimal fees. Step 1 (C) Integrate war plugin with the DisableSMALLplanets plugin, therefore depending on the size of conquered planets, the bot will systematically stop targeting smaller planets.

FINAL STEP; Deploy and test plugins FINAL STEP 2; Documentation, Hello world interface that is easy to use

This will ultimately be the product asked in this github thread. As the bot is able to 1) Find and extract silver, 2) Upgrade its planets, 3) Choose which planets to attack, 4) Systematically grows an empire by targeting larger targets 5) Is absolutely free to use, only dark forest key is necessary, even the fees of xDai are generated from this bot.

evanmays commented 2 years ago

Did some refactoring, issue with old repo was that driving the game from python is very unstable.

Built a new architecture for the bot thats more javascript driven. This is my v0.1 of the plugin. It's got some rough edges especially as your empire grows it becomes less efficient. Right now the algorithm is just, pick random planet, then attack. But it's easy to swap out for better algorithms whether they be hardcoded AI algos or a machine learning AI approach.

https://github.com/evanmays/autopilot/blob/main/dist/plugin-v0.1.js

owocki commented 2 years ago

thanks! anyone interested in testing/QAing this + posting notes?

im behind after vacation but can test it after that..

owocki commented 2 years ago

hey all; thanks for the submissions thus far! i'm going to test a few of them and pay them out by 9/15.

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 1.5 ETH (4524.52 USD @ $3277.29/ETH) attached to this issue has been cancelled by the bounty submitter

owocki commented 2 years ago

canceling this now; i think im going to pay out the winner this week (likely @Arachnid and @evanmays as they had the only valid submission). lmk if i missed anyone