Commit 7c9ffdef authored by SINDT--BARET Yanis's avatar SINDT--BARET Yanis
Browse files

[Update] Seed + minim change

parent d1a04d4c
......@@ -16,6 +16,7 @@ def create_basic_file(path:str,index:int) -> None:
def change_resultjson_seed(index :int, result_id: str, path="") -> None:
with open(f"{path}result.json", "r") as file:
data_json = json.load(file)
random.seed(1)
data_json["seed"] = random.randint(1,1000000)
with open(f"{path}result_{result_id}_{index}.json","w") as result_file:
json.dump(data_json,result_file)
......@@ -25,7 +26,7 @@ if __name__ == '__main__':
result_id : str = input("Give a short ID (3 char) to find result of the simulation : ")
load_basic : bool = input("Do we need to create all basic files ? (y/n) : ")
nb_hikes = int(input("How many hikes do you want to do ? : ")) #faire un try except
inversion_rate = int(input("Which probability of inversion ? : "))
inversion_rate = input("Which probability of inversion ? : ")
nb_gen = int(input("How many generation ? : "))
is_neutral_mut = input("Do you allow neutral mutation ? (y/n) : ").lower()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment