AttackingOrDefending / lidraughts-bot

A bridge between Lidraughts API and draughts engines
GNU Affero General Public License v3.0
7 stars 10 forks source link

Can we run Lidraughts bot in heroku #3

Open techyking07 opened 3 years ago

techyking07 commented 3 years ago

The title is the question

Please tell me @AttackingOrDefending

AttackingOrDefending commented 3 years ago

Yes. You do exactly what you would do for lichess-bot. I will make some changes explaining how to run a bot in heroku.

AttackingOrDefending commented 3 years ago

I pushed the changes explaining it. You can find them here.

techyking07 commented 3 years ago

@AttackingOrDefending what is the recommended engine to make bot using heroku

AttackingOrDefending commented 3 years ago

You can use Scan (https://github.com/rhalbersma/scan).

aladdinGene commented 2 years ago

If I run this code in heroku, how can I use this for what?

aladdinGene commented 2 years ago

And could you tell me how to use 8x8 CBEngine in detail?

AttackingOrDefending commented 2 years ago

Use the steps here, to run a bot on heroku. You can't run a CBEngine in heroku because heroku uses Linux while the engines were compiled for windows.

aladdinGene commented 2 years ago

Thank you for your response. I ran the code in heroku. Then how can I use application in heroku? I can't load page after deploy this code on heroku. Thank you.

AttackingOrDefending commented 2 years ago

For an engine you can download Scan (hjetten.home.xs4all.nl/scan/scan.html). Copy or rename the file config.yml.default to config.yml. Create an account and get a bot token (github.com/AttackingOrDefending/lidraughts-bot#lidraughts-oauth). To setup the engine follow the steps github.com/AttackingOrDefending/lidraughts-bot#setup-engine. Edit the variants (supported_variants) and time controls (supported_tc) from the config.yml (use # to disable certain ones).

For hosting it on heroku:

aladdinGene commented 2 years ago

I already deployed the code on heroku. After deploy on heroku, how to use it? Thank you.

AttackingOrDefending commented 2 years ago

Go to Resources (https://dashboard.heroku.com/apps//resources), click "Edit dyno formation" and enable the app and click "Confirm".

aladdinGene commented 2 years ago

I already done and I saw this log. Screenshot_13

I want to know how to use it. Thank you.

aladdinGene commented 2 years ago

I'm going to make a checkers game AI engine using Node js or Python. But I'm a beginner and have poor algorithm knowledge. Do you know where is checkers game AI engine made by Python or Node js? Thank you.

AttackingOrDefending commented 2 years ago

The log means that it works.

Examples of a Python checkers engine:

aladdinGene commented 2 years ago

Could you tell me how to use this code after deploying on Heroku? Thank you.

AttackingOrDefending commented 2 years ago

They aren't compatible with lidraughts-bot. You are going to have to modify them in order to connect them to lidraughts-bot. You can use the homemade protocol. Otherwise, you can use an engine that supports the hub or dxp protocol that you can find on the internet, like Scan which is what your bot already uses.

aladdinGene commented 2 years ago

I used scan from (https://github.com/rhalbersma/scan). Then there is no error when building. Could you send me a screenshot of compatibility with lidraughts-bot? Thank you.

AttackingOrDefending commented 2 years ago

None of them are compatible with lidraughts-bot. The last one is probably the easiest to adapt, since it already uses pydraughts. See here for the file with the engine logic.

SriMethan commented 1 year ago

Note : - Anyone can run a bot on Heroku

But,

Finally, Heroku doesn't have any free plans, but I guess they have some eco plans or basic plans which charges only low cost to run the bot on Heroku,

If someone needs another free alternative of Heroku take a look at cloudcommunity/Free-Hosting

If someone prefers a paid alternative of Heroku take a look at cloudcommunity/Cloud-Free-Tier-Comparison

SriMethan commented 1 year ago

Hey!

Guess what I found!

render.com/docs/migrate-from-heroku

Completely free

Only for web not worker though

for migrating to vercel from heroku I think I found a video too if you want...

But that's only web too