## 1 Introduction  
Small, portable devices have limited processing and energy capacity, but they are usually required to perform processing intensive tasks such as image processing, augmented reality, real-time sensory input processing [1], and Internet of things [2]. An obvious solution to this issue is to use more advanced and power-efficient chips. This, however, is not always possible, as the use of cutting-edge chip technologies can be very expensive and might require many more years of advancement before it becomes a viable solution. Another approach is to offload tasks to the cloud, where the tasks are executed and the results sent back to the portable devices. This method also is not always possible, as some applications require a very small processing delay and transmitting data over the network through several routers is simply too slow to be applicable. A third method is to use a set of computational devices located at the edge of the network. That is, these computational devices are either directly connected to mobile devices or they are much closer to the mobile devices compared to cloud servers [3]. Using this approach, mobile devices can offload some of their tasks to these devices while maintaining a minimal transmission delay. As a result, mobile devices can meet the time-delay requirements of their tasks without requiring more advanced chips or running out of battery power [4].  
By choosing the right tasks to offload to edge devices, edge processing can boast the advantages of both local execution and cloud processing, while avoiding the disadvantages associated with them. That is, selectively offloading tasks to edge devices can lower the processing time to much lower than what can be achieved using a cloud solution or local execution, as it avoids the latency of task propagation to the cloud or the slow execution of tasks locally. Additionally, it can provide the same energy-saving advantages of a cloud solution without congesting the network or requiring more advanced and capable chips.  
However, it is not always clear which tasks should be offloaded to edge devices and which ones should be executed locally. For instance, a task with a high computational requirements but a small task size might be more suitable for task offloading compared to a task with lower computational requirements and a large task size, as the transmission of a large file can be more time consuming than local execution of that task. Additionally, the decision can also depend on the current workload of the mobile and connected edge devices. If a connected edge device has a light workload while the mobile device has a large number of tasks queued for local execution, then it might be better to offload a task even if it has a large task size. One method for tackling this uncertainty is to hard-code offloading rules for a specific environment. Such an approach, however, will be too rigid and will require reconfiguration whenever the environment changes. Another approach is to use a reinforcement learning agent to make the offloading decisions. In this work, we use a deep Q-learning model in mobile and edge devices to make the offloading decisions. Training an artificial neural network for the Q function of the Q-learning model, however, can require significant computational and energy resources by itself, which is a burden for the limited computational and energy capacity of mobile devices. This is an issue that is barely addressed in the literature. In this work, we address this issue by training the neural network for the Q function in edge devices and sending the trained network to mobile devices for decision-making.