This is the last of the series of articles about this project, if you haven’t read the previous rounds yet, I recommed you to check them out. If you already read them thank you very much for your interest and let’s get started!

Image for post
Image for post

Introduction

The last weeks was a very stressful one, I tried to train the model using different methods (changing the reward function many times, normalyzing the inputs, reshaping the NN, etc) but unfortunatelly I couldn’t make it work 😕, the model has a behavior pretty silly and it doesn’t seems to converge.

So I decided to stop the project here to keep working on new ones. Honestly I don’t like to left projects but this one taked much more time than others and I don’t want to lose my motivation, I want to keep moving and trying new ideas for projects. …


If you haven’t read the round 1 and round 2 articles yet, I recommend you check it out before you start reading this article. If you already read round one and two, let’s get started.

Image for post
Image for post

Introduction

This week I was researching a lot the implementation of a reinforcement learning algorithm to train the agent for the game. So after reading some articles, forums and documentation, I confirmed that what I need to implement is Deep Q learning algorithm.

Deep Q learning pseudocode

Based on this article called Playing Atari with Deep Reinforcement Learning, the algorithm looks like the following:

Image for post
Image for post
Deep Q-learning algorithm | Image from this DeepMind Paper

Python implementation

I thought about implementing it from scratch but then I remembered that Github exists… and, after searching for a while, I found this implementation in Python to train an agent in the OpenAI Gym CartPole environment. …


If you haven’t read the round 1article yet, I recommend you check it out before you start reading this article. If you already read round one, let’s get started.

Image for post
Image for post
Picture by Marlon Marçal on Behance

Introduction

After discussing my ideas for this project a bit on Reddit, some fellows told me that Google Colab supports JavaScript code in the environment by using ijavascript kernel. So it’s not necessary to migrate the game environment code to Python. The only drawback with this approach is that the use of GPUs and TPUs is not optimized so well for JavaScript.

Image for post
Image for post
Ijavascript logo by their Github

So, after investigating the pros and cons, I decided to use colab for javascript since using a different environment for training will probably cause an overfitting, in fact, the most important thing for training is the quality of the data we use, and in our case, the “dataset” is the environment in which the agent “learns” with its possible actions. …


This is a starting point of a series about an adventure I want to share. This article explores an idea that came to my mind the last week and that I’m researching about. The idea is to create an expert AI player of Mortal Kombat based on reinforcement learning techniques.

Image for post
Image for post
Picture by Marlon Marçal on Behance

Note: On this series of articles I will carry out some research about something that, in my own view, it could work. So if you came here searching for answers, this is the wrong place, here we will find questions, many of them.

Introduction

I came out with this idea after reading this awesome paper about agents learning to behave in complex environments written by OpenAI team. In a nutshell, the paper is about agents learning how to play hide and seek in a small space with walls and objects. …


The power of deep learning architectures and the handy Tensorflow.js library allows us to create interesting applications that change the way we interact with computers. In this case, we use a pose estimation neural network to create a virtual steering wheel based on the position of the wrists.

Image for post
Image for post
Photo by XR Expo on Unsplash

Introduction

In this project I will show an example of integration between web applications and deep learning models to transfer the application controls from the mouse and keyboard to the human body.

In this case, I created a virtual steering wheel to drive a vehicle on a highway.

Image for post
Image for post
Video screenshot from Github Readme | gif by the author

How it works

Summary

Taking the coordinates of the wrists we can calculate the segment between them and then the angle that it forms with the horizontal axis, if this angle is above 25° or below -25°, then the vehicle will turn to the left or right respectively. …


The growth of processing power in devices and Machine learning allows us to create new solutions that a few years ago couldn’t have been achieved. In this case, I want to show an interesting way to perform authentication using Flutter and Tensorflow Lite with face recognition.

Image for post
Image for post
Source: BBC post

Introduction

I will explain step by step, how is the process of building a fairly simple facial recognition app that contains 3 functionalities: Sign Up, Sign In and Clear DB.

Process summary

Sign up

  1. The user takes a photo.
  2. The ML models process it and create an output (array of numbers) to be stored in a database.
  3. A name and a password are requested (the name is not actually necessary, it’s requested just to show a greeting in your profile). …


In recent years, the interaction in Twitter has become increasingly toxic with the rise of hate speech, harassment and offensive content. In this article, I want to explain how to build a simple toxic tweet detector, using twitter API and tensorflow.js.

Image for post
Image for post

Introduction

In this post I want to show step by step how to build a web application that shows the last toxic tweets and retweets from the given user.

The application will receive 2 parameters: tweets to search and username.

  • Tweets to search: the number of tweets that we want to bring from the twitter API to be analyzed (10, 20, 50 or 100). …


Edge devices, such as smartphones, have become more powerful with the passing of time and enabled an increasing number of on-device machine learning use cases.

Image for post
Image for post

What is Tensorflow?

TensorFlow is a platform for building and training neural networks, which allow detecting and deciphering patterns and correlations, analogous to the learning and reasoning used by humans.
TensorFlow’s flexible architecture enables developers to deploy computation to one or more CPUs or GPUs on desktops, servers, or mobile devices with a single API. …


Cascading Style Sheets, better known by its acronym CSS, is a language used to display the design elements of a web page, which generally must be defined separately.

Image for post
Image for post

Why is CSS loading performance important?

HTML and XML documents contain information only about the content or semantics of some of the components of a website, while design resources are found separately in so-called CSS files. If Stylesheets are used, the server has to access them (where multimedia content such as photos, videos, etc. is stored) each time the web is visited, which clearly has an impact on load times. The larger and more complex the CSS files are, the longer the visitor will have to wait to see the contents of a website. …


This article shows you step-by-step how to set up and run your own customized video player in Flutter to play videos from the device file-system or using a given URL such as http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4.

Image for post
Image for post
KiddVideoPlayer in full screen mode

Setup

The first step is to add the KiddVideoPlayer plugin as a dependency in the pubspec.yaml file. The package is available as kidd_video_player on pub.dartlang.org.

Once you do that, you need to run flutter packages get.

For Android

Be sure that the following line appears in the <application ...> tag located in android/app/src/main/AndroidManifest.xml.

Also make sure the line below appears outside the <application ...> tag:

For iOS

Warning: The video player is not functional on iOS simulators. An iOS device must be used during development/testing. …

About

Marcos Carlomagno

Machine Learning and Frontend padawan, on the open source side of the force.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store