function INFORMATION-GATHERING-AGENT(percept) returns an action
persistent: D, a decision network
integrate percept into D
j ← the value that maximizes VPI(Ej) / Cost(Ej)
if VPI(Ej) > Cost(Ej)
return REQUEST(Ej)
else return the best action from D
Figure ?? Design of a simple information-gathering agent. The agent works by repeatedly selecting the observation with the highest information value, until the cost of the next observation is greater than its expected benefit.