In this paper, we propose a distributed solution to design a multi-hop ad hoc Internet of Things (IoT) network where mobile IoT devices strategically determine their wireless transmission ranges based on a deep reinforcement learning approach. We consider scenarios where only a limited networking infrastructure is available but a large number of IoT devices are deployed in building a multi-hop ad hoc network to deliver source data to the destination. An IoT device is considered as a decision-making agent that strategically determines its transmission range in a way that maximizes network throughput while minimizing the corresponding transmission power consumption. Each IoT device collects information from its partial observations and learns its environment through a sequence of experiences. Hence, the proposed solution requires only a minimal amount of information from the system. We show that the actions that the IoT devices take from its policy are determined as to activate or inactivate its transmission, i.e., only necessary relay nodes are activated with the maximum transmit power, and nonessential nodes are deactivated to minimize power consumption. Using extensive experiments, we confirm that the proposed solution builds a network with higher network performance than the current state-of-the-art solutions in terms of system goodput and connectivity ratio.