Recently, a wide range of small devices, such as Wi-Fi Internet of things development boards, which are a kind of the microcontroller units in a general purpose board, are interrelated throughout the planet. In addition, certain microcontroller units interact inside our homes when turning lights on or detecting movements, measuring various parameters, such as gas concentrations, [Formula: see text], humidity, and the temperature inside a room, or adjusting the intensity of the lights inside and outside of the house. Likewise, there is a great diversity of microcontroller units, ranging from smart cellular telephones or reduced general purpose devices, ESP8266 or RaspberryPi3 to any type of Internet of things devices. Therefore, the general way of connecting the microcontroller units to the Internet is through hub nodes, so that the information can be propagated and shared among them. The main purpose of this article is to yield an adaptive reconfiguration algorithm to link all the sensor nodes (microcontroller units) of a network based on the fractal topology, avoiding the use of hub nodes, in order for the microcontroller units to share all the parameters established in the Internet of things network only through two adjacent sensor nodes as long as any sensor node in the network knows all the parameters of the other ones, even if the sensor nodes are not adjacent. To achieve the above, in this work, an Internet of things network was built based on the Hilbert fractal for being a filling-space curve yielded from the L-systems paradigm, so this fractal Hilbert topology allows access to the entire Internet of things network in a dynamic way, and it is possible to reconfigure the network topology when a new sensor node is attached by applying artificial intelligence to intelligent and dynamic environments.