# Repeating simulations

**URL:** https://discourse.julialang.org/t/repeating-simulations/81236
**Category:** New to Julia
**Tags:** question, simulations
**Created:** [May 18, 2022, 7:11am UTC](https://discourse.julialang.org/t/repeating-simulations/81236 "2022-05-18T07:11:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vamp](https://avatars.discourse-cdn.com/v4/letter/v/f4b2a3/32.png) [@vamp](https://discourse.julialang.org/u/vamp)
#### Post date: [May 18, 2022, 7:11am UTC](https://discourse.julialang.org/t/repeating-simulations/81236/1 "2022-05-18T07:11:12Z")

</div>

Hello,

I am using Julia for reinfocement learning and to repeat my simulations I would like to know if I can use a `seed`? I tried

```julia
Random.seed!(1)

```

But it does not repeat the same simulations.

---

<div class="post-metadata">

### Author: ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)
#### Post date: [May 18, 2022, 7:23am UTC](https://discourse.julialang.org/t/repeating-simulations/81236/2 "2022-05-18T07:23:07Z")

</div>

Theoretically the seeding should be enough, but it is hard to know without a minimal working example. Note that you have to _re-run_ `Random.seed!(1)` every time you run the simulations

---

<div class="post-metadata">

### Author: ![vamp](https://avatars.discourse-cdn.com/v4/letter/v/f4b2a3/32.png) [@vamp](https://discourse.julialang.org/u/vamp)
#### Post date: [May 18, 2022, 7:44am UTC](https://discourse.julialang.org/t/repeating-simulations/81236/3 "2022-05-18T07:44:10Z")

</div>

> [@gdalle](#):
>
> Random.seed!(1)

Perfect, the problem was that I did not know that I had to re-run it. Thanks!
