## 1 Introduction  
The Internet of Things (IoT) [1, 2, 3] plays a vital role in transforming the device-centric approach to a user-centric approach using seamless connectivity and providing pervasive services according to context and user mode [4, 5]. Integrating cognitive sensors with IoT infrastructure has brought about a significant change in real applications such as energy production and transmission, intelligent transportation systems (ITS) [6], healthcare (E-Health and Telemedicine) [7], agriculture (E-Forming) [8, 9], smart homes [10], and smart cities [11]. Most of the IoT is based on physical sensors embedded in other devices and home appliances to create these smart spaces. However, these sensors are resource-restricted and require a careful strategy in deployment because the intensive use of resources can lead these systems to stall and disconnect before performing their intended tasks [12; 13]. Cognitive IoT sensors collect data from the environment and disseminate it to other sensors and central authorities for decision making and further processing. A huge volume of data is produced at frequent intervals at central points [14; 15]. These frequent communications inside the system not only create congestion and buffer overflow, but also consume a significant amount of energy. The detection of redundant and useless data communications has greatly affected network performance. Suppose that the same data is circulated, and the system remains busy with these unwanted packets. In that case, system resources are used for undesirable data collection, and many useful sensing cycles are wasted [16; 17; 18; 19]. With the emergence of artificial intelligence techniques such as deep learning (\(DL\)), systems have become more resilient, responsive, interactive, and intelligent [20]. \(DL\) trains and learns from available data and responds accordingly to any situation. Typically, it consists of perception and comprehension, learning and judgment, rationality and planning, and finally design and resolution [21; 22; 23]. With the integration of cognitive sensors, most IoT devices learn and decide like humans. A cognitive sensor with different controllers collects data from the environment and transmits it to other devices and central points. All of these entities collaboratively manage the situation and respond to any event. Based on an external event with machine learning procedures, cognitive sensors play an important role in data collection and automation [24]. Using these machine learning procedures, the devices can optimize according to the situation and the user mode and can provide services according to the situation based on the external event [25; 26]. The main aim is to develop a novel scheme that uses reinforcement learning to optimize the operations of an IoT network, according to traffic conditions and sensor functions. Instead of using the static structure of CAS-IIoT-RL [22], LSTM-RL [27], and AEM-RL [28], ASC-RL has been implemented for a dynamic IoT. These baseline schemes use vector features, time series, and QoS metrics, respectively, while ASC-RL uses sensor states and traffic conditions for the optimization of network operations. In these schemes, no critical infrastructure parameters are found, while in the proposed method, there are three types of parameters. These changes affect all performance parameters, including energy enhancement, sensor reconfiguration, and minimizing delay, latencies, and packet loss. The main contributions of the ASC-RL are as follows. * Propose a novel scheme for the use of cognitive techniques in IoT sensors with a reinforcement learning procedure to dynamically change the state of the sensors. A sensor state model is established, and each sensor adapts its new state based on three types of parameters. These changes affect all performance parameters, including energy enhancement, sensor reconfiguration, and minimizing delay, latencies, and packet loss.