An agent's interface
2020-02-22 18:25 #commit
I’ve almost finished an specialization about reinforcement learning, so it’s time to test the skills I’ve gained. It’s only an introductory course and we have only scratched the surface of RL, but I think I can code a simple agent to play a children’s game: Deserto.
I’ll write about RL and implementing agents later, but it’s not as easy as just implementing it: there is a lot of additional work to be done. I’ll need a way to test my agent with human players, and a mobile app will be the best option for that: you could enter the moves of the other players on the phone and see the agent’s move on it. Maybe that’s putting the cart before the house, but I’m still doing the last course of the specialization and I want to implement my agent after finishing it, so implementing the agent’s interface is a way to advance some work on it.
I could implement an Android app or a React Native one (I’ve done this before). But, why should I? A simple web interface would suffice for what I want: it will contain only some graphic elements and a engine to run a pre-trained agent. So I could create a Progressive Web Application (PWA) and get the best of each world: a Web app and an installable mobile app.
That’s something I haven’t done before, so it’s time to learn. I will first implement a dummy “Hello World” PWA. The minimum characteristics of PWAs are, as stated in Wikipedia:
- Originate from a secure origin. Served over TLS and green padlock displays (no active mixed content).
- Load while offline (even if only a custom offline page). By implication, this means that progressive web apps require service workers.
- Reference a web app manifest with at least the four key properties: name, short_name, start_url, and display (with a value of standalone or fullscreen)
- An icon at least 144×144 large in PNG format.
I will test in on an emulated Android terminal. First thing to do is to serve the app over TSL. I haven’t used SSL for development and I only have a superficial knowledge about how certificates work, so the first step will be to research it.