From 34b78c22589cfc10b7c87b4c85f5c5037dc4c95e Mon Sep 17 00:00:00 2001 From: FiveMovesAhead Date: Wed, 29 May 2024 13:05:40 +0800 Subject: [PATCH] Clearly state in docs to use challenge.seed for StdRng. --- docs/guides/innovating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/innovating.md b/docs/guides/innovating.md index 8894feda..78d1c253 100644 --- a/docs/guides/innovating.md +++ b/docs/guides/innovating.md @@ -135,7 +135,7 @@ language governing permissions and limitations under the License. * If you are copying and modifying an algorithm that has been submitted to TIG, make sure to use the `innovator_outbound` version * Do not include tests in your algorithm file. TIG will reject your algorithm submission. * Only your algorithm's rust code gets submitted. You should not be modifying `Cargo.toml` in `tig-algorithms`. Any extra dependencies you add will not be available when TIG compiles your algorithm -* If you need to use random number generation be sure to use `StdRng::seed_from_u64` to ensure your algorithm is deterministic. +* If you need to use random number generation be sure to use `let mut rng = StdRng::seed_from_u64(challenge.seed as u64)` to ensure your algorithm is deterministic. ## Locally Compiling Your Algorithm into WASM