Code Monkey home page Code Monkey logo

bestmobabot's Introduction

bestmobabot

Python 3.8 GitHub tag (latest SemVer) Build Status GitHub issues Docker Pulls License

⚠️ I've quitted the game and don't longer develop the bot. However, I'm willing to respond on discussions and address pull requests. ⚠️

⚠️ Я перестал играть и забросил развитие бота. Тем не менее, я готов отвечать на вопросы, рассказывать как всё устроено и принимать правки. ⚠️

«Хроники Хаоса» – бот для VK.com.

Авторы и помощники / Contributors

Pavel Perestoronin Natalia Perestoronina

Лицензия / License

Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Creative Commons License

bestmobabot's People

Contributors

antareada avatar eigenein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bestmobabot's Issues

Общая база реплеев

Было бы классно хранить все журналы арены всех пользователей бота в одной общей базе, переобучать модель в облаке и сразу всем ее раздавать.

Важно: узнать, как защититься от намеренно плохих данных.

Ошибка на арене

Sep 29 13:17:44 (bestmobabot.scheduler:83) [I] Running attack_normal_arena scheduled at Sep 29 13:17:44 UTC+03:00…
Sep 29 13:17:44 (bestmobabot.bot:354) [I] Loading model…
Sep 29 13:17:44 (bestmobabot.api:210) [I] #8: heroGetAll({}) in 5.0 seconds…
Sep 29 13:17:50 (bestmobabot.api:210) [I] #9: userGetInfo({}) in 7.1 seconds…
Sep 29 13:17:57 (bestmobabot.api:210) [I] #10: arenaFindEnemies({}) in 9.8 seconds…
Sep 29 13:18:08 (bestmobabot.scheduler:112) [C] Uncaught error.
Traceback (most recent call last):
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\scheduler.py", line 98, in execute
    next_run_at = task.execute()
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\bot.py", line 416, in attack_normal_arena
    finalise=lambda: None,
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\bot.py", line 372, in attack_any_arena
    solution = make_solver(model, heroes).solve()
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\arena.py", line 135, in solve
    return secretary_max(self.yield_solutions(), self.max_iterations, early_stop=self.early_stop)
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\itertools_.py", line 53, in secretary_max
    for i, item in enumerate(items, start=1):
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\arena.py", line 146, in yield_solutions
    yield max(self.solve_enemy_cached(enemy) for enemy in enemies)
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\arena.py", line 146, in <genexpr>
    yield max(self.solve_enemy_cached(enemy) for enemy in enemies)
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\arena.py", line 185, in solve_enemy_cached
    solution = self.solve_enemy(enemy)
  File "C:\Users\Waff\Downloads\bestmobabot-master\bestmobabot-master\bestmobabot\arena.py", line 219, in solve_enemy
    for group_1, group_2 in combinations(groups, 2)  # select two groups to interchange heroes in
  File "C:\Users\Waff\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core\shape_base.py", line 283, in vstack
    return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)
ValueError: need at least one array to concatenate

Migrate to sqlitemap

Ideas:

  • shared collection for shared keys
  • user_12345 collection for user-specific keys

Keep in mind, currently value is a string while in sqlitemap it's bytes. Possible migration:

create table "shared" (`key` text not null primary key, `value` blob not null);
insert into "shared" (`key`, value) select `key`, value from `default`;

Питомцы на арене

В списке противников питомец выглядит как герой с флагом type:

{"id":6005,"level":45,"color":1,"star":2,"type":"pet"}

В атаке на обычной арене:

{"calls":[{"name":"arenaAttack","args":{"userId":6404278,"heroes":[10,13,35,25,39],"pet":6000},"ident":"body"}]}

На гранд арене:

{"calls":[{"name":"grandAttack","args":{"userId":951791,"heroes":[[36,32,29,34,35],[40,16,28,37,7],[25,38,13,2,43]],"pets":[6000,null,null]},"ident":"body"}]}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.