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.
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.
Truth-SocketsLast Updated on May 3, 2021
A website where you can go and play the game of truth game in sync.
In the game, you can create or join an existing room, Once you have joined the room you are asked to add your questions which you might ask someone in the game. Once everyone has entered their questions and is ready to play. You click on begin the game, which starts a 10-sec countdown after which all the entered questions from all the users in the room are laid out randomly on cards that are flipped so you can't see the questions.
And a random person is chosen by the game to flip the card and answer the question, which is also flipped in sync across all the users in the room
The project is built in a Node.js environment and uses Socket.io to communicate with servers and across all the users in a room. When a user selects a card, a message regarding that particular card is sent to the server which in turn broadcasts the message to all the clients in a room and thus allowing the game to be played in sync. The server maintains the status of all the rooms and their current state.
Clone the repo, and move to the folder, and run the command node server.js
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
Voice Of The DayLast Updated on May 3, 2021
The format used to work well on the radio, so we wanted to recreate those memories on Alexa.
What it does
Players can listen to up to three voice clips of well-known people and/or celebrities talking every day, as well as view a blurred image of the celebrity. After each clip, Alexa will ask you who you think is talking, and you must try to answer correctly. This will earn you a score for the monthly and all-time leader boards. The player can ask Alexa for hints, or to skip that voice clip to move onto the next one. Users scores are awarded depending on how many incorrect answers they gave for that voice and whether they used a hint or not. Users can also ask to hear yesterday’s answers, in case they couldn’t get the answers on that day.
How I built it
To create the structure of the skill, we used the Alexa Skills Kit CLI.
We used Amazons S3 storage for all our in-game assets such as the audio clips and images.
We used the Alexa Presentation Language to create the visual interface for the skill.
We used the Amazon GameOn SDK to create monthly and all-time leader boards for all users to enter without any sign up.
Every day, free users will be given the ‘easy’ clip to answer. The set of clips each day will be selected dependant on the day of the year. Users who have purchased premium gain access to the ‘medium’ and ‘hard’ clips every day, as well as being able to ask for hints for the voices, skip a voice if they are stuck, and enter scores onto the leader boards.
Accomplishments that I’m proud of
As well as creating a high-quality voice-only experience, we developed the skill to be very APL focused, which we are very proud of. The visual assets we used for the project were very high quality and we were able to dynamically display the appropriate data for each screen within the skill. The content loaded depends on who is talking, as well as the difficulty of the voice that the user is answering. APL also allowed us to blur and unblur the celebrity images, as opposed to having separate blurred and unblurred images for each person.
We were also very pleased with how we implemented the GameOn SDK SDK into the skill. When the user submits a score, they have a random avatar created for them, and their score will be submitted under this avatar. This avoids any sign up to use the leader boards, allowing all users to use it easily.
GameOn SDK also allows us to create monthly and all-time competitions/leader boards which all users are automatically entered.
What I learned
I have learnt how to develop APL as well as better practices for structuring it more efficiently. For example, there are many APL views in the project, all of which are almost identical, what I have learnt that would be more effective in future projects would be to condense these down into one primary view that I would use for each screen and just use the appropriate data.
I have also been able to hone prompts to the user for upsells and showing the leader boards. Testing has shown that constant prompts on each play for these things can become tedious to the user, and so we have reduced the frequency of these for a much better user experience.