eigenein / bestmobabot Goto Github PK
View Code? Open in Web Editor NEW«Хроники Хаоса» – бот для VK.com
Home Page: https://eigenein.github.io/bestmobabot/
«Хроники Хаоса» – бот для VK.com
Home Page: https://eigenein.github.io/bestmobabot/
В списке противников питомец выглядит как герой с флагом 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"}]}
Было бы классно хранить все журналы арены всех пользователей бота в одной общей базе, переобучать модель в облаке и сразу всем ее раздавать.
Важно: узнать, как защититься от намеренно плохих данных.
Ideas:
shared
collection for shared keysuser_12345
collection for user-specific keysKeep 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`;
Кто - нибудь знает?
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.