MLCrack

    REINFORCEMENT LEARNING · INTERVIEW QUESTION

    Define the terms: agent, environment, state, action, and reward in the context of reinforcement learning.

    🟢 beginner · Fundamentals & MDPs

    Hint: Think about the core RL loop: agent observes state, takes action, receives reward.

    Answer

    Agent: The learner/decision-maker that interacts with the environment.

    Environment: Everything outside the agent that it interacts with. Provides states and rewards.

    State (s): A representation of the current situation. Can be fully or partially observable.

    Action (a): A choice the agent makes from the action space A\mathcal{A}.

    Reward (r): A scalar feedback signal indicating how good the action was.

    The RL Loop

    Agent observes state s_t → takes action a_t → environment transitions to s_{t+1} → agent receives reward r_t → repeat

    The agent's goal is to maximize the cumulative discounted reward: Gt=∑k=0∞γkrt+k+1G_t = \sum_{k=0}^{\infty} \gamma^k r_{t+k+1}

    where γ∈[0,1]\gamma \in [0,1] is the discount factor controlling the trade-off between immediate and future rewards.