Module Ai

val flocking : ?speed:Playground.number -> ?force:Playground.number -> ?radius:Playground.number -> ?separation:Playground.number -> ?alignment:Playground.number -> ?cohesion:Playground.number -> Physics.body list -> Physics.body -> Physics.body
val facing : Physics.body -> Physics.body
val way : walkable:((int * int) -> bool) -> ?diagonal:bool -> (int * int) -> (int * int) -> (int * int) list
val way_over : cost:((int * int) -> Playground.number) -> ?diagonal:bool -> (int * int) -> (int * int) -> (int * int) list
type flow
val flow : walkable:((int * int) -> bool) -> ?diagonal:bool -> (int * int) -> flow
val next_step : flow -> (int * int) -> (int * int) option
val steps_to_go : flow -> (int * int) -> Playground.number option
type ('state, 'move) rules = {
  1. moves : 'state -> 'move list;
  2. play : 'state -> 'move -> 'state;
  3. score : 'state -> Playground.number;
  4. my_turn : 'state -> bool;
}
type ('state, 'move) opponent
val thinking_ahead : int -> ('state, 'move) rules -> ('state, 'move) opponent
val playing_out : int -> ('state, 'move) rules -> ('state, 'move) opponent
val hinting : ('state -> 'move list -> 'move list) -> ('state, 'move) opponent -> ('state, 'move) opponent
val best_move : ('state, 'move) opponent -> 'state -> 'move option
val thoughts : ('state, 'move) opponent -> 'state -> ('move * Playground.number) list
type ('state, 'move) pondering
val pondering : ('state, 'move) opponent -> 'state -> ('state, 'move) pondering
val ponder : ('state, 'move) pondering -> ('state, 'move) pondering
val settled : ('state, 'move) pondering -> bool
val answer : ('state, 'move) pondering -> 'move option
val so_far : ('state, 'move) pondering -> ('move * Playground.number) list
val a_frame_of : int -> ('state, 'move) opponent -> ('state, 'move) opponent
type ('mode, 'context) change
type 'mode mind
val on : ?why:string -> 'mode -> ('context -> bool) -> 'mode -> ('mode, 'context) change
val after : ?why:string -> int -> 'mode -> 'mode -> ('mode, 'context) change
val mind : 'mode -> 'mode mind
val doing : 'mode mind -> 'mode
val doing_for : 'mode mind -> int
val deciding : ('mode, 'context) change list -> 'context -> 'mode mind -> 'mode mind
val changed : 'mode mind -> string option
val modes : ('mode, 'context) change list -> 'mode list
type ('world, 'senses, 'intent) bot
type ('senses, 'intent) playing
val bot : senses:('senses option -> 'world -> 'senses) -> ('senses -> 'intent) -> ('world, 'senses, 'intent) bot
val reacting_in : int -> ('world, 'senses, 'intent) bot -> ('world, 'senses, 'intent) bot
val deciding_every : int -> ('world, 'senses, 'intent) bot -> ('world, 'senses, 'intent) bot
val skill : Playground.number -> ('world, 'senses, 'intent) bot -> ('world, 'senses, 'intent) bot
val playing : 'intent -> ('senses, 'intent) playing
val thinks : ('world, 'senses, 'intent) bot -> 'world -> ('senses, 'intent) playing -> 'intent * ('senses, 'intent) playing
val noticed : ('senses, 'intent) playing -> 'senses option
val aim_error : spread:Playground.number -> ?settle:Playground.number -> seen_for:int -> seed:int -> unit -> Playground.number