I actually develop an AI that use reinforcement learning, and i am searching for a way to modify a variable (that stay at the value after use, for exemple if i have a value 'pos' at 10, and then i change the value of 'pos' to 11, 'pos' needs to stay at 11, even after the closing of the main program.) in another program that store progress of the AI (call it 'training' for exemple), all that using code in my main script. I am not using any modules except random, i try to make an AI without, it's part of the challenge. More precisely, i want to update values tables of 'training' with my main script, to make the AI progress in its choices. I've seen someone done it in Java, but i can't figure out how to do it in Python.
Code:
file 'main':
import training_board as tb
def Main():
def AI():
# do AI things
# need to change value of 'pos' in 'training_board'
# code that i need, who will change the value of 'pos' in 'training_board' PERMANENTLY
# go back at doing other AI things
Thanks for answearing ! If you need more specific info, please write them in the comments, im kinda new to this ^^'
Ps: English isn't my first language, so i apologize for grammar errors and stuff ^^'