Tic-Tac-Toe GameLast Updated on May 3, 2021
This project Tic Tac Toe game against a simple artificial intelligence. An artificial intelligence (or AI) is a computer program that can intelligently respond to the player’s moves. This game doesn’t introduce any complicated new concepts. The artificial intelligence that plays Tic Tac Toe is really just a few lines of code.
Two people play Tic Tac Toe with paper and pencil. One player is X and the other player is O. Players take turns placing their X or O. If a player gets three of their marks on the board in a row, column or one of the two diagonals, they win. When the board fills up with neither player winning, the game ends in a draw.
This chapter doesn’t introduce many new programming concepts. It makes use of our existing programming knowledge to make an intelligent Tic Tac Toe player. The player makes their move by entering the number of the space they want to go. These numbers are in the same places as the number keys on your keyboard's keypad
First, you must figure out how to represent the board as data in a variable. On paper, the Tic Tac Toe board is drawn as a pair of horizontal lines and a pair of vertical lines, with either an X, O, or empty space in each of the nine spaces.
In the program, the Tic Tac Toe board is represented as a list of strings. Each string will represent one of the nine spaces on the board. To make it easier to remember which index in the list is for which space, they will mirror the numbers on a keyboard’s number keypad.
The strings will either be 'X' for the X player, 'O' for the O player, or a single space ' ' for a blank space.
So if a list with ten strings was stored in a variable named board, then board would be the top-left space on the board. board would be the center. board would be the left side space, and so on. The program will ignore the string at index 0 in the list. The player will enter a number from 1 to 9 to tell the game which space they want to move on.
Creating a program that can play a game comes down to carefully considering all the possible situations the AI can be in and how it should respond in each of those situations. The Tic Tac Toe AI is simple because there are not many possible moves in Tic Tac Toe compared to a game like chess or checkers.
Our AI checks if any possible move can allow itself to win. Otherwise, it checks if it must block the player’s move. Then the AI simply chooses any available corner space, then the center space, then the side spaces. This is a simple algorithm for the computer to follow.
The key to implementing our AI is by making copies of the board data and simulating moves on the copy. That way, the AI code can see if a move results in a win or loss. Then the AI can make that move on the real board. This type of simulation is effective at predicting what is a good move or not.
Share with someone who needs it
Oxygen Generator Plants By LindeLast Updated on May 3, 2021
Our PSA oxygen generator plants are based on a reliable, flexible and trouble-free vacuum pressure swing adsorption (VPSA) process. They are the perfect fit for on-stream applications that require low-cost gaseous oxygen with purity levels of up to 95 percent per volume.
Which Linde oxygen generator is right for you?
Our portfolio consists of three different types of oxygen generator (V)PSA plants as following:
- VPSA: Our customised oxygen VPSA plants range in capacity from around 300 Nm³/h up to 10,000 Nm³/h and can produce oxygen purities between 90 and 95 percent per volume.
- VPSA C series: We offer several pre-engineered, fully standardised and containerised VPSA plants for capacities between 300 Nm³/h and 2,000 Nm³/h (our C series). The C series plants are easily accessible and easy to maintain. They are quick to set up and commissioned on site and can also be easily relocated.
- PSA: Furthermore, we offer an alternative oxygen PSA process, without vacuum regeneration for low oxygen production capacities of 50 Nm³/h to 500 Nm³/h.
Our oxygen generator PSA and VPSA plants deliver a host of benefits including:
- Oxygen on demand
- Energy efficiency
- Easy partial load operation
- High availability
- Fully automated operation
Linde Engineering – Full flexibility in oxygen production
Linde Engineering is specialized in efficient plant construction. Our focus on customer demands enables us to develop plants with optimum energy efficiency that significantly reduce costs – whether oxygen production demands are high or low in volume.
Smart Health Monitoring AppLast Updated on May 3, 2021
The proposed solution will be an online mobile based application. This app will contain information regarding pre and post maternal session. The app will help a pregnant lady to know about pregnancy milestone and when to worry and when to not. According to this app, user needs to register by entering name, age, mobile number and preferred language. The app will be user friendly making it multi-lingual and audio-video guide to help people who have impaired hearing or sight keeping in mind women who reside in rural areas and one deprived of primary education. The app will encompass two sections pre-natal and post- natal.
In case of emergency i.e. when the water breaks (indication) there will be a provision to send emergency message (notification) that will be sent to FCM (Firebase Cloud Messaging), it then at first tries to access the GPS settings in cell, in case the GPS isn’t on, Geolocation API will be used. Using Wi-Fi nodes that mobile device can detect, Internet, Google’s datasets, nearby towers, a precise location is generated and sent via Geocoding to FCM, that in turn generates push notifications, and the tokens will be sent to registered user’s, hospitals, nearby doctors, etc. and necessary actions will be implemented, so that timely help will be provided
False Alarm Detection SystemLast Updated on May 3, 2021
This project was made for a chemical industry which had sensors installed in various parts of the factory to detect H2S gas which is hazardous to health. Every time one or multiple sensors detected the H2S leak, an emergency alarm rings to alert the workers. For every alarm, the industry calls a team which sanitizes the place and checks for the leak and this was a big cost to the company.
A few of the alarms that ring are not even hazardous. The company gave us the data for each alarm with a final column stating the alarm was dangerous or not.
Unwanted substance deposition (0/1)
The data was first pre-processed and analysis libraries like Numpy and Pandas were used to make it ready to be utilized by a machine learning algorithm.
Problems like standard scaling, categorical data and missing values were handled with appropriate techniques.
Then, we used Logistic Regression model to make a classifier with first five column as independent columns and dangerous column as dependent/target column.
Now whenever, there is a leakage and the alarm rings, the data is sent to us and we predict if it is dangerous or not. If found dangerous then only the team is called to sanitize the place and fix the leak. This saved a lot of money for the company.
House Price PredictorLast Updated on May 3, 2021
Here we have taken the information of a valid housing data set consisting of information of 500+ Houses. By taking all attributes as factors we will predict the price of the house. We are going to take advantage of all of the feature variables available to use and use it to analyze and predict house prices. Here we have to predict the price of the house on the basis of the following attributes:
~lot size – Square feet of the house I need. (Numerical)
~Bedroom- How many bedrooms I need? (Numerical)
~bathroom – How many bathrooms I need? (Numerical)
~stories-How many stories building I need? (Numerical)
~driveway –Whether I need a driveway or not? (Binary)1 for yes and 0 for no.
~recreational room-Whether I need a rec room or not? (Binary)1 for yes and 0 for no.
~Gas hot water - Whether I need Gas Hot water or not? (Binary)1 for yes and 0 for no.
~full base- Whether I need a full base or not? (Binary)1 for yes and 0 for no.
~Air condition- Whether I need Air condition or not? (Binary)1 for yes and 0 for no.
By entering all these inputs of the attributes, and by using multivariate regression we will predict the house at price in $.
We have split the dataset into two parts training and testing set. Then by training the dataset we will use multivariate regression and predict the house of the price in the testing data set.
Here we have also compared actual and predicted price using Machine Learning
Rock Paper ScissorsLast Updated on May 3, 2021
This is a handy game which is generally played between 2 players and which is certainly loved by every child on the earth. Each player performs 1 out of 3 shapes that is Rock, Paper, Scissors.
Rock beats scissors, Paper beats Rock and Scissors beat Paper.
There are 2 outcomes of this game which is loose or win. Random module is used in this game project. The random module will select a value between the given range. So as to install the random module, simply go to command prompt and type “pip install random”
There are 2 functions in this code which is “choose_option_for_user" and "computer_option".
In first function, it allows the player to choose one among rock paper and scissors and in the second function it allows the computer to make its choice. Here, the computer will choose the option randomly with the help of random module. And the last is the while loop, where we determine whether the player or the computer wins the round or whether it’s a tie.
The main logic of the game is that the player will choose their choice then the computer will choose the choice then both the choices will be compared and winner will be determined. If the player wants to play again then they can choose yes/no in it and if they doesn’t want to play it will break the loop.