Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we run Lidraughts bot in heroku #3

Open
techyking07 opened this issue Jul 9, 2021 · 20 comments
Open

Can we run Lidraughts bot in heroku #3

techyking07 opened this issue Jul 9, 2021 · 20 comments

Comments

@techyking07
Copy link

The title is the question

Please tell me @AttackingOrDefending

@AttackingOrDefending
Copy link
Owner

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
Copy link
Owner

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

@techyking07
Copy link
Author

techyking07 commented Jul 10, 2021

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

@AttackingOrDefending
Copy link
Owner

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

@aladdinGene
Copy link

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

@aladdinGene
Copy link

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

@AttackingOrDefending
Copy link
Owner

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
Copy link

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
Copy link
Owner

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:

  • Move all the files from "./heroku" to "."
  • In startbot.sh, change "chmod +x ./engines/engine_name" to "chmod +x ./engines/scan_linux" (rename Scan to scan_linux and use the linux version)
  • Follow the last 3 steps from github.com/AttackingOrDefending/lidraughts-bot/tree/main/heroku
  • Maybe you can deploy from github instead of heroku git and put the token in the environment variable but I haven't tested it.

@aladdinGene
Copy link

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

@AttackingOrDefending
Copy link
Owner

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

@aladdinGene
Copy link

I already done and I saw this log.
Screenshot_13

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

@aladdinGene
Copy link

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
Copy link
Owner

@aladdinGene
Copy link

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

@AttackingOrDefending
Copy link
Owner

AttackingOrDefending commented May 2, 2022

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
Copy link

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
Copy link
Owner

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
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants