Skip to content

Commit

Permalink
adding scaling factor for cheat, easier cheat
Browse files Browse the repository at this point in the history
  • Loading branch information
sameerlal committed Apr 25, 2019
1 parent 28f3ec8 commit 236b27d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions stats.ml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ let linear_reg_cheat (market : Marketmaker.t ) (dice:dice_data) =
in
(* Currently using a gaussian blur kernel on the last three values *)
let ans = matr_mul ((1::2::1::[])::(2::4::2::[])::(1::2::1::[])::[]) last_three [] in
abs_float ((float_of_int dice.sum_rolls) -. 0.3*.raw_lsr /. (chebyshev_like_var ( float_of_int ( List.nth ans 0) )))
abs_float ((float_of_int dice.sum_rolls) -. 0.3*.raw_lsr /. (
if (chebyshev_like_var( float_of_int ( List.nth ans 0) )) < 1.0
then 1.0/.((chebyshev_like_var ( float_of_int ( List.nth ans 0) )))
else (chebyshev_like_var ( float_of_int ( List.nth ans 0) )) ))
else
(* Linear regression for bids*)
(* Linear regression for asks *)
Expand All @@ -244,7 +247,10 @@ let linear_reg_cheat (market : Marketmaker.t ) (dice:dice_data) =
in
(* Currently using a gaussian blur kernel on the last three values *)
let ans = matr_mul ((1::2::1::[])::(2::4::2::[])::(1::2::1::[])::[]) last_three last_three in
abs_float ((float_of_int dice.sum_rolls) -. 0.3*.raw_lsr /. (chebyshev_like_var ( float_of_int ( List.nth ans 0) )))
abs_float ((float_of_int dice.sum_rolls) -. 0.3*.raw_lsr /. (
if (chebyshev_like_var( float_of_int ( List.nth ans 0) )) < 1.0
then 1.0/.((chebyshev_like_var ( float_of_int ( List.nth ans 0) )))
else (chebyshev_like_var ( float_of_int ( List.nth ans 0) )) ))

(**[count lst str acc] is the frequency of occurrence of [str] in [lst]. *)
let rec count lst str acc =
Expand Down

0 comments on commit 236b27d

Please sign in to comment.