MOj0 / LoR-Bot

Bot for Legends of Runeterra
MIT License
27 stars 14 forks source link

Block loop #14

Closed Jungle221 closed 2 years ago

Jungle221 commented 2 years ago

Hi, nice bot you made I like it, but it's best use would just be farming xp in AI games overnight for cards, now it plays decent enough with a suggested deck but it has a major flaw. Since card data is static it has a big problem with defending against units that don't have fearsome/elusive as a keyword by default but they get it from some effect. This causes the bot to get stuck in a loop of just attempting to place a unit to block it, and the msg this unit can't be blocked being played on repeat. I spent a lot of time with your bot and that is #1 point of failure. Since AI games don't have time limits for your turn it just bricks the bot. I'm not the best with python, so I'm just gonna throw my suggestion and ask you to help me make it work for me. Fix 1. When it's players turn, if more than x time passes just pass the turn. 3-5 minutes would be okay. Fix 2. Just never block. If you don't plan to implement a way to pass to prevent the loop, can you please help me just make it so that AI just never places any units to block?

MOj0 commented 2 years ago

Hi, I'm glad you like it :) I've come across this issue where a card gets buffed to obtain fearsome/elusive and bot is not aware of that, however I haven't thought of AI games, since I mostly used the PvP mode. I like your 1st suggestion, and I will implement some variant of it the day after tomorrow. In the meantime, you can try farming in PvP mode, I think it even gives you more XP (not sure though).

Jungle221 commented 2 years ago

Xp in this game has a fixed daily cap on how much you can earn from wins and losses and its separate for AI and PvP. Here is the data PVP Wins (per day) Wins 11-15 (in one day) reward 150 XP. Wins 16-20 reward 100 XP. Wins 21-30 reward 50 XP. Wins 31+ reward 0 XP. PVP Losses Losses 5-10 (in one day) reward 50 XP. Losses 11+ (in one day) reward 0 XP. Vs AI Wins (per day) Wins 5-10 reward 75 XP. Wins 11-20 reward 50 XP. Wins 21+ reward 0 XP. Vs AI Losses Base XP reward is 50 XP. Losses 5-10 reward 25 XP. Losses 11+ reward 0 XP.

Jungle221 commented 2 years ago

That is why i farm pve with the bot, since it often looses, maxing out loss xp's for PvP and AI is the first thing I let my bot do every day. Thank you for replying appreciate you!

MOj0 commented 2 years ago

Oh, I see. This commit should fix it https://github.com/MOj0/LoR-Bot/commit/e46c7ac1c9e2a515019c07a7e18866903ca21e08, if not feel free to open another issue.