Radiation dose is the amount of ionizing radiation delivered to a patient or tissue. In radiotherapy, the aim is to deliver enough to control the tumor while limiting exposure to nearby healthy organs, known as organs at risk. Radiation can damage cancer-cell DNA, but it can also harm healthy tissue. section 8.4
Dose accumulates across treatment sessions, or fractions. At each fraction, beam direction and intensity affect both the tumor and surrounding organs. Earlier doses influence later decisions, while the tumor may shrink or grow in response to treatment. section 8.4
Dose in a treatment simulation
A simulated treatment environment tracks cumulative doses, the remaining tumor target and margins below organ limits. An action selects an organ and intensity; dose also spills to neighboring organs. The reward favors progress toward the tumor target and penalizes organ-limit violations. section 8.4
Listing 8.3 Decoding actions and applying dose
def _action_to_params(self, action: int):
organ_idx = action // self.n_intensity_levels #A
intensity_idx = action % self.n_intensity_levels #A
intensity = self.intensity_levels[intensity_idx] #B
return organ_idx, intensity #C
def _apply_dose(self, organ_idx: int, intensity: float):
dose_change = np.zeros(self.n_organs,
➥dtype=np.float32) #D
dose_change[organ_idx] += intensity #E
base_spill_factor = 0.3 #F
tumor_spill_factor = base_spill_factor
➥* (1.0 + 0.3 * (self.tumor_size - 1.0)) #F
for neighbor in (organ_idx - 1, organ_idx + 1): #G
if 0 <= neighbor < self.n_organs:
if organ_idx == 0 or neighbor == 0:
spill = intensity * tumor_spill_factor #H
else:
spill = intensity * base_spill_factor #I
dose_change[neighbor] += spill
The dose application code shows how an intensity is assigned to a selected organ and how dose spills to neighbors. section 8.4
