Machine Learning, Game Theory Algorithms, and Medium Access Protocols for 5G and Internet-of-Thing (IoT) Networks