# How can we estimate the transition model and reward function?

In reinforcement learning (RL), there are model-based and model-free algorithms. In short, model-based algorithms use a transition model (e.g. a probability distribution) and the reward function, even though they do not necessarily compute (or estimate) them. On the other hand, model-free algorithms do not use such transition model or reward function, but they directly estimate e.g. the state or state-action value functions by interacting with the environment, which allows the agent to infer the dynamics of the environment.

Given that model-based RL algorithms do not necessarily estimate or compute the transition model or reward function, in the case these are unknown, how can them be computed or estimated (so that they can be used by the model-based algorithms)? In general, what are examples of algorithms that can be used to estimate the transition model and reward function of the environment (represented as either an MDP, POMDP, etc.)?