Gts @ Nerd Camp

Picture 9

Nbd but kbd, just me eating lunch in front of THE Craig Reynolds.

In all seriousness it was incredibly fascinating to listen to Mr. Reynolds speak. He was the first person to simulate flocking on a computer and he actually showed us the program he made called Boids. He has made some unbelievable programs and it was a real honor to get to speak with him and eat lunch with him.

Picture 19

This was after a long day of hard work at the Academy of Science. I didn’t realize everyone had passed out but I guess a long day of thinking too hard really zaps you.

Advertisements

Finished Boggle Game

This is a picture of a game of Boggle I made. To check whether a word is on the board, I checked if the first letter was on the board and then used recursion to make sure that the next letter was on the board and connected to the previous letter. The game is played just like a normal game of Boggle would be played–I programmed in each cube to be identical to the ones in the real game. I will upload the game when I figure out how to.

Picture 28

What is AI?

To me, AI is  very broad field. I would consider a computer to have artificial intelligence when it can learn by itself–without a human telling it exactly what to do. Something with artificial intelligence is something that can look back at past occurrences, evaluate the data, and then act autonomously using the data it has analyzed. I consider any game that has a computer controlled character acting on its own as artificial intelligence. I would not consider it artificial intelligence if I plugged 3 x 4 into the computer and it spat back 12 because the computer is not analyzing a situation and acting, it is just using its bits to store numbers and add them. When I explained to my friends what artificial intelligence is, I used an example of playing a computer in connect-4, and the computer storing every move to determine which moves give it a better chance of winning.

connect4

Tank Trouble: Learning A* and Pathfinding

1. Paper Abstract/Summary

The purpose of this project is to apply AI to a game that we will write. Luca and I were both particularly interested in creating a game where we could program the computer to be so good that it would actually beat us in our own game. We are hoping to create a game that will combine pathfinding, physics, and possibly even predictive movement by the computer.

430px-Pathfinding_A_Star.svg

2. Introduction/Background

We want to make a tank game that will focus mostly on pathfinding and graphics. The graphics are important because we want to make a game that looks professional, doesn’t have lag time, and can handle many dynamic objects on the screen at once. Pathfinding is another crucial aspect to the game. A game with an easily beatable tank would not be fun to play, so the tank needs to be able to calculate and pursue the fastest path to a constantly moving target.

tanks

3. Application

Luca and I are going to make our own version of Tank Trouble. The game is set in a maze, with one human-controlled tank and one computer-controlled tank (although we plan on including more than one AI tank in our game). The left and right arrows rotate the tank and the up and down arrows move the tank forward and backward. When a certain button is pressed, the tank fires a bullet. The aim of the game is to blow up the opposing tank. Bullets bounce off of walls, increasing the difficulty and complexity of the game. The computer-controlled tank should be able to seek out where the player’s tank is, find a quick path to it, predict where it will move to, and shoot both at where the tank is and where it predicts the other tank may travel to.

predict4. Previous Work

Pathfinding and shooting has been implemented in thousands of games. Beyond the original Tank Trouble game that we are partially trying to emulate, pathfinding and shooting appear in many 2D games and a lot of 3D video games, like Halo, Call of Duty, and Battlefield Bad Company. Even games like Super Smash Bros rely on pathfinding and fighting technique so the computer can adequately challenge the player. Any game that involves a computer character has components of pathfinding and following.

pezbot

5. Current Problems in the Area

Computer scientists and game developers are constantly working to make computer opponents in games smarter and more efficient. While professionals have come up with many solutions to computer movement, we foresee ourselves running into some obstacles. Seeking out the player tank will be challenging because the player will be shooting at the computer tank, so it must avoid both bullets and walls while trying to home in on the player. Having the computer decide when to shoot will also be difficult.

6. Proposed Solutions

While we have not finished our research, we think that pathfinding and wall avoidance can be tackled by using A* or Dijkstra’s algorithm. The gif we looked at in class depicting the “thought-process” of A* resonated with both of us because it seemed to be a very logical way to find a direct path to another object while avoiding obstacles. To predict where the player will be if he is constantly moving, we thought that a Markov chain could help by looking at the past few movements and predicted from there. Dr. Holsclaw’s talk helped us identify a Markov chain as a possible way to predict movement. We can have the computer shoot when it finds a straight path that is unimpeded to the player’s tank.

pathfind

7. Conclusion

Tank Trouble will be a very fun game to make because it combines graphics and autonomously intelligent computer opponents, both things that we have been learning in class. Both topics will challenge us, but the end result will be a game that looks clean and is fun to play. This is a game that I hope to bring home and show my friends and family to show them how computer science is functional and cool, and hopefully get them involved in the field of computer science and artificial intelligence.

8. Future Work

By learning and implementing AI in this game, any game that has a computer opponent would be possible for me to make (at least on a 2D level for now). This would be cool because I could make more games during the school year that use this framework. I am hoping to learn to code games in multiple languages as well.

9. References

Patel, Amit. “Amit’s A* Pages.” Red Blob Games. Red Blob Games, 2013. Web. 26
July 2013.

Book Proposal

Programming Game AI by Example by Mat Buckland is an ideal book to aid me and Luca in our project. One particularly interesting chapter is “How to Create Autonomously Moving Game Agents.” This chapter covers steering behaviors, wall avoidance, and flocking–all things that would be increase the “intelligence” of a computer-controlled tank. The toughest foreseeable obstacle in creating Tank Trouble is generating a pathfinding and shooting scheme for the computer-controlled tank. Pathfinding sections in this book include in depth reading on A* and Dijkstra’s Algorithm, both topics that we covered in class but that we would love to learn even more about. The book covers how to do things in multiple languages, which is important because we haven’t decided whether to code our project in Java or C++. Other chapters cover triggers and projectiles, which will allow for us to create a highly functioning autonomous tank.

aibook2

http://www.amazon.com/Programming-Game-Example-Mat-Buckland/dp/1556220782/ref=sr_1_2?s=books&ie=UTF8&qid=1374874743&sr=1-2&keywords=AI+for+games

Artifical Intelligence for Games by Ian Millington and John Funge is another book that could help us with our project. The first two chapters of the book have some subsections that would be very helpful, including “Decision Making” and “Heuristics.” Chapter 3 is all about movement–there are large subsections of the chapter on steering behaviors, collision avoidance, obstacle and wall avoidance, path following, aiming and shooting, projectile trajectory, and different types of chasing and fleeing a target. It is paramount that we understand these topics to make a good game that involves shooting, colliding, and path following. Chapter 4 is titled “Pathfinding,” and the subsections of the chapter will delve further into the strategies of creating and choosing optimal paths to reach a target. This book also covers A* and Dijkstra’s algorithm. Later chapters cover decision making, computer learning, and action prediction. Buying the book (even used) is very expensive, but Luca and I would pool our money together and even add some of our own.

aibook

http://www.amazon.com/Artificial-Intelligence-Games-Ian-Millington/dp/0123747317/ref=sr_1_5?s=books&ie=UTF8&qid=1374873053&sr=1-5&keywords=AI+pathfinding#selectedObb=rbb_ubb_trigger

AI/Game Conference

ai conferenceOne professional conference I’d love to attend is the annual AI/Game Conference in Vienna, Austria. The last one took place in September 2012, but this years conference had to be rescheduled so the next one will be in July 2014. The conference has three main focuses: artificial intelligence, gameplay, and character animation. Our final project is going to be very dependent on pathfinding, and given the topics that are explored at the conference, I feel as though I would learn a lot about computers being able to make their own routes in games. Gaining knowledge on pathfinding and possibly predicting the movement of a player would prove invaluable in our final project, where the player will be moving and the computer will try to actively seek out the player and shoot it.

vienna-10