How to save and load a Q-Learning Agent
To save a model's state, it is enough to save the model's parameters. If you are using Torch, then you can save it as follows torch.save(model.state_dict(), path_to_save).

When you want to resume training with a saved model, you would have to first create the model instance, and then you can use model.load_state_dict(torch.load(path_of_saved_model)) to update the new instance with the parameter values of the saved model.

You can find more reference here: https://pytorch.org/tutorials/beginner/saving_loading_models.html

There will be something similar for Tensorflow or any other framework that you use.

You can also have an evaluation function that evaluates how good your model is after a certain number of iterations, and save the one which performs the best.

Hope that helps!