asobi_bot (asobi v0.84.0)
View SourceGeneric bot process that runs a Lua AI script each tick.
The bot joins a match as a player, receives game state updates,
and sends input decisions based on the Lua think(bot_id, state) function.
Also handles auto boon picking and auto voting.
A bot is tracked through asobi_presence:track_bot/2, so it is a delivery
target for asobi_presence:send/2 like any player session but is never
counted by asobi_presence:online_count/0. The messages it consumes are the
public asobi_presence:message/0 contract, not an ad-hoc shape.
Both state strategies arrive as {match_state, map()}. Under
state_strategy = "shared" the match server still encodes once for the whole
roster, and asobi_presence:send_match_state/3 hands the bot the term behind
that frame rather than the frame, so a bot decodes nothing per tick.
Summary
Functions
-spec handle_call(term(), gen_server:from(), map()) -> {reply, ok, map()}.
-spec start_link(pid(), binary(), binary() | undefined) -> gen_server:start_ret().