Identify which problem each network modification addresses and validate one needed change, rather than applying every improvement.
Before practice
01 Do Double, Dueling, and PER address the same problem?
Description
Double changes next-action selection and value evaluation; Dueling changes the Q representation; PER changes experience sampling. They do not all address the same problem.
02 Does replay create states never experienced?
Description
Dueling can combine streams as Q=V+A−mean(A). PER samples high-error experiences more often while accounting for sampling bias and weights. It does not create states outside the experience distribution.
Execution conditions
Uses NumPy, PyTorch, and Gymnasium. In the final activity, read an external data card and analyze transitions you collected.
Applications
Throughput and cost of equipment and communication resources
An average of 2 items arrive at the synthetic queue each time step. Increasing service capacity reduces queue length but increases energy cost.
Observation·State
Queue length …20. Observation .
Action
Choose a processing capacity of 0, 2, or 4.
Reward·Constraint
−(next queue length + 0.2×capacity² + 10×dropped items). Time limit at 100 steps.
Comparison baseline
Constant capacity of 2, and a threshold policy based on queue length.
Metrics to check
Evaluation return, mean queue length, mean capacity², and dropped-item count.
Choose equipment inspection times
Frame the research problem as balancing the cost of inspecting every time against the cost of missed failures.
Observation·State
Recent sensor readings, trends, and time since the last inspection. Distinguish the actual fault state from observations.
Action
Continue operating, inspect, or replace.
Reward·Constraint
Operating profit minus inspection, replacement, and failure costs.
Comparison baseline
Periodic inspection and threshold alarms.
Metrics to check
Availability, failure count, and total cost. Check for failure label leakage.
1. Distinguish selection, evaluation, representation, and sampling
Starting conditions
, .
, .
Dueling: , .
TD Error: .
Procedure
Calculate DQN and Double DQN targets by hand and mark the parts of the equations that differ.
Use small arrays to inspect Dueling's mean correction and PER sampling probabilities for /.6.
In one line each, connect the three methods to the possible failures they target.
Results to retain
Calculation table distinguishing targets, representations, and sampling probabilities.
Items to record and points to check
Method
What changes
Worked example
Target problem
Points to check
Did you distinguish the networks used for action selection and evaluation?
Did you distinguish sampling probabilities from loss weights?
2. Verify only one needed improvement
Starting conditions
On Queue, compare dqn with just one of double, dueling, or per. Use 1800 transitions for each, the same seed=0, and the same evaluation set.
Procedure
Find where the selected method changes the code and first state why it may change the results.
Run dqn and the selected method with the same training budget and evaluation set.
Record which of return, queue length, and cost actually changed, and judge whether the method is needed based on these results.
Results to retain
Selection rationale and an evaluation table for both configurations. If needed, leave rerunning seed=1 as an extension.
Items to record and points to check
Training seed
Training transition count
Return mean and standard deviation
Mean queue length
Capacity²
Dropped items
Points to check
Did you avoid interpreting a decrease in loss as an immediate improvement in policy performance?
Did you record results that fell below the baseline in a short training run as observed?
3. Examine the distribution of transition data
Starting conditions
Compare transitions collected by Random and Rule in the public CartPole environment. Replay cannot create experiences outside the collection policies' visited range.
Procedure
Compare angle, angular velocity, and action distributions and episode lengths for both policies with the same seed.
Reload transitions saved as NPZ, and explain how drawing one transition repeatedly differs from experiencing a new state.
From the Minari Fourrooms-Random data card, find the collection policy, observation format, environment ID, and license, and tabulate the fields needed for your research data. Leave data downloading and training as extensions.
Results to retain
1 plot of the visited-state distribution and a data card summary table.
Items to record and points to check
Materials
Collection policy
Environment and version
Observation and action format
Distribution and terms of use
Points to check
Did you avoid treating randomly shuffled transitions as a continuous episode?
Did you distinguish data collected directly from a public environment from an external public dataset?