Skip to content

Commit e95fca0

Browse files
author
Guy Aridor
committed
update README
1 parent 06df70d commit e95fca0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,15 @@ Now, we can call `simulate` and get back a `BanditStats` object which returns th
3030

3131
As well, this package provides an `aggregate_simulate` function which aggregates the results of N simulations run in parallel and returns the average.
3232

33+
Example usage as follows:
34+
```julia
35+
using Bandits
36+
37+
thompson_sampling = ThompsonSampling()
38+
sb = staticbandit([Bernoulli(0.5), Bernoulli(0.6)])
39+
beta_agent = BetaBernoulliAgent([0.6, 0.5], thompson_sampling, sb)
40+
stats = simulate(sb, beta_agent, 100)
41+
print(stats.regret)
42+
```
43+
3344
License: MIT

0 commit comments

Comments
 (0)