Dynobot with Computer Vision

Dynobot with Computer Vision

Let’s have some fun today! Everyone probably uses the Chrome browser at some point. And many knew that if you don’t have an internet connection Chrome will allow you to play dinosaur game. Today we are going to try to build a bot which will play this game for us.

Let’s have some fun today! Everyone probably uses the Chrome browser at some point. And many knew that if you don’t have an internet connection Chrome will allow you to play dinosaur game. Today we are going to try to build a bot which will play this game for us.

Methodology

What we are going to do is to capture part of the screen where the game is happening and take a screenshot of it. And we’re going to make it as fast as possible. Then we will convert the image into an array of pixel values. Dynobot will parse values if the pixels on the given part of the screen and if it detects an obstacle it will hit space and jump over it.

Setup

To build our bot we will use python because it provides various libraries for data parsing and computer vision. Here the list of libraries we going to need for our Dynobot:

Image for post

Make sure that all libraries installed globally or in your virtual environment.

Computer Vision

And now I can see! To give out bot ability to see the world we are going to use a *mss *library. It will take a picture of the giving part of the screen and save it into .png format.

computer-vision programming python games chrom

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Guide to Python Programming Language

Guide to Python Programming Language

Python Programming: A Beginner’s Guide

Python is an interpreted, high-level, powerful general-purpose programming language. You may ask, Python’s a snake right? and Why is this programming language named after it?

Python Hello World Program - Create & Run Your First Python Program in PyCharm

Python Hello World Program - Your first step towards Python world. Learn how to create the Hello World Python program in PyCharm.

Python Programming Tutorials For Beginners

Python Programming Tutorials For Beginners

How to Remove all Duplicate Files on your Drive via Python

Today you're going to learn how to use Python programming in a way that can ultimately save a lot of space on your drive by removing all the duplicates. We gonna use Python OS remove( ) method to remove the duplicates on our drive. Well, that's simple you just call remove ( ) with a parameter of the name of the file you wanna remove done.