  In this work, we consider a remote monitoring scenario in which multiple
sensors share a wireless channel to deliver their status updates to a process
monitor via an access point (AP). Moreover, we consider that the sensors
randomly arrive and depart from the network as they become active and inactive.
The goal of the sensors is to devise a medium access strategy to collectively
minimize the long-term mean network \ac{AoI} of their respective processes at
the remote monitor. For this purpose, we propose specific modifications to
ALOHA-QT algorithm, a distributed medium access algorithm that employs a policy
tree (PT) and reinforcement learning (RL) to achieve high throughput. We
provide the upper bound on the mean network Age of Information (AoI) for the
proposed algorithm along with pointers for selecting its key parameter. The
results reveal that the proposed algorithm reduces mean network \ac{AoI} by
more than 50 percent for state of the art stationary randomized policies while
successfully adjusting to a changing number of active users in the network. The
algorithm needs less memory and computation than ALOHA-QT while performing
better in terms of AoI.
