Cancer illness still is one of the most common illnesses in the world, which is constantly rising. Chemotherapy plays a crucial role in treating cancer patients. In this paper, we have presented a novel intelligent sensor for controlling and adjusting chemotherapy parameters which consist of an ultra-local (ULM) controller based on a deep deterministic policy gradient (DDPG). First, the feedback signal is provided using a sensor to calculate the population of cells. Then, a controller sends the proper control commands to the actuator (chemotherapy). In the suggested scheme, the ULM is applied to the dynamic model of cancer. In order to shrink tumor cells and rising immune and normal cells at the same time. Moreover, for improving the performance of the established ULM scheme, a DDPG algorithm with the actor-critic structure is used for tuning the parameters of ULM in an adaptive manner. To demonstrate the supremacy of the DDPG based ULM controller, the conventional ULM and proportional integrator (PI) are also designed for the cancer treatment. Simulation outcomes prove the improved cancer treatment compared to the ULM and PI schemes.