aboutsummaryrefslogtreecommitdiff
path: root/calculette_aoo/lib/build.mli
blob: 7e39b7118dc0c7c9f6d7c62e82e3d4a48f101be9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
type build = {
    a : Carac.t
  ; m : Carac.t
  ; rm : Carac.t
  ; pm : Carac.t
  ; fm : Carac.t
}

type env = {
    cout_sort : int
  ; degat_sort : int
  ; max_tours : int
  ; fm_oponent : int
  ; cost_max : int
  ; frequencies : (int * float) list
}

val buil_freq_table : int -> int -> (int * float) list
(** Build a list with the differents percentages to hit *)

val cost : build -> int
(** Get the cost for a build *)

val score : env -> build -> float
(** Get the score for the build *)

val traverse : env -> int * float -> build list -> build
(** Test differents upgrade configuration and present the best one with the
    constraints given in [env]. 

    The costt for the upgrade will not exceed the property [env.cost_max] 
    *)

val upgrade : env -> build -> build list
val repr : env -> Format.formatter -> build -> unit