Live data from Hacker News

AI Programmer’s Bookshelf

alumni.media.mit.edu

11–20 of 28 posts

Re: AI Programmer’s Bookshelf

#11
post #10

This is about game AIs, which are definitely interesting. But for the most part they overlap very little with what most people think of as AI. In undergrad (mid 2000s) I partially specialized in both computer graphics and machine learning, and took a video game class to try combining these skills. I have two big memories from this time that stuck with me. The first is the time a dev on Civilization 1 visited our clas…

Once you see the "man behind the curtain," game AI loses some of its magic. I'm sure a lot of those devs wanted to make something really sophisticated, but like you said there's a balance between function and performance and for the majority of players the faked version works just as well.

I made a euchre game several years ago and put in an AI as basic as you mention for Civ: all it did was pick a random card from its hand that followed suit. If they were placing the first card, it was all random. I got praise from people at how the AI surprised them with feints etc to beat them when they thought they were going to get points. Some I told, others I let believe the magic :)

Re: AI Programmer’s Bookshelf

#12
post #10

This is about game AIs, which are definitely interesting. But for the most part they overlap very little with what most people think of as AI. In undergrad (mid 2000s) I partially specialized in both computer graphics and machine learning, and took a video game class to try combining these skills. I have two big memories from this time that stuck with me. The first is the time a dev on Civilization 1 visited our clas…

It's true that game AI is surprisingly under-developped compared to what you see in academia on other topics... but it is not always that basic.

What you describe in your football example is often called "Behavior Tree", and there are ways to learn those using machine learning (usually by reinforcement learning, using neural networks and/or genetic programming). There was a popular video showing this applied on Mario [1] ... and a paper published 7 years before that video doing the same thing [2] (more context about this in [3]). I remember seeing something on Gamasutra saying that similar methods are used in some AAA games.

[1] https://www.youtube.com/watch?v=qv6UVOQ0F44 [2] http://julian.togelius.com/Togelius2009Super.pdf [3] http://togelius.blogspot.co.uk/2016/04/the-differences-betwe...

Re: AI Programmer’s Bookshelf

#13
post #8

Earlier quoted context omitted.

ML isn't really used in game programming. These books focus on more practical techniques such as State Machines, Pathfinding, Planning, Scripting etc.

Exactly. Game AI is not so much about making AI smart, but more about making it fun.

I haven't played it, but there is a game called Smart Kobold that tries to up the AI difficulty as far as it can reasonably go. In some sense, I think it satisfies your criteria. The punishing difficulty is what makes it rewarding, and it accomplishes it through AI rather than making creatures harder to kill or do more damage.

I do agree with your statement in the vast majority of cases. Ultimately, fun trumps everything else when it comes to games (though what counts as fun is subjective). Even Dark Souls, which many (most) gamers consider difficult, is not difficult because of unbeatable AI. It's full of patterns (indeed, that's how you get better at the game: you recognize and respond correctly to those patterns).

Re: AI Programmer’s Bookshelf

#14

Many of the books seem older than 10 years (also in the general exams list[1]). Are the (seemingly) vast advancements in the last years still based on the same principles? (Speaking as a complete ML noob.) [1]: http://alumni.media.mit.edu/~jorkin//generals/general_exams....

As others have said, game AI doesn't draw from "real" or academic AI or Machine Learning.

That said, the references for AI and machine learning are quite old. Particularly the machine learning parts. The only ML texts on the list are Mitchell and Duda and Hart. The former is extremely outdated at this point. That's not Mitchell's fault -- it was a nice book for learning the basics of machine learning in 1997 when it was published, but all the developments that have made ML a hot subject have occurred since then and in areas that the book simply didn't predict coming. Duda and Hart, similarly, was the bible for certain subfields of ML for a long time, but it won't tell you what everyone's been doing in the past 15 years when ML exploded onto the wider scene.

If I were to add one book, it would be Kevin Murphy's excellent text (https://www.amazon.com/Machine-Learning-Probabilistic-Perspe...). There's no one book that will give you a complete picture of the field, but his is I think the closest available and does a solid job of preparing you with enough fundamentals that you can extend your knowledge from there on your own.

Re: AI Programmer’s Bookshelf

#15
post #10

This is about game AIs, which are definitely interesting. But for the most part they overlap very little with what most people think of as AI. In undergrad (mid 2000s) I partially specialized in both computer graphics and machine learning, and took a video game class to try combining these skills. I have two big memories from this time that stuck with me. The first is the time a dev on Civilization 1 visited our clas…

Once you see the "man behind the curtain," game AI loses some of its magic. I'm sure a lot of those devs wanted to make something really sophisticated, but like you said there's a balance between function and performance and for the majority of players the faked version works just as well. I made a euchre game several years ago and put in an AI as basic as you mention for Civ: all it did was pick a random card from i…

The base AI that came with the card gaming engine that we developed agents for during university was called "thumb"...it always played the cards closest to an imaginary thumb of the hand holding the cards. Some people played 10+ games against it thinking it was really impressive :D

More sophisticated rules based card game agents can actually look very good unless you play a huge number of hands against them (depends on the game structure though, trick taking games work well, poker agents can usually be understood quickly even though an agent that simply plays very aggressively usually looks strong for a bit).

Re: AI Programmer’s Bookshelf

#19
post #10

This is about game AIs, which are definitely interesting. But for the most part they overlap very little with what most people think of as AI. In undergrad (mid 2000s) I partially specialized in both computer graphics and machine learning, and took a video game class to try combining these skills. I have two big memories from this time that stuck with me. The first is the time a dev on Civilization 1 visited our clas…

I had the same experience. I was creating a multi-user game-like experience and I had to come up with a client-side human "simulator" that was meant to be used if human players couldn't be found (what people would call a "bot" in most games). I tried several different iterations of what I perceived to be complex human-like decision-making rules. In the end what I ended up using was just very simple behavior mostly based on random number generation. Users could not distinguish that from real people. My previous complex rules-based solutions felt very robotic in comparison.

Still, I consider the classic game AI to be a real type of AI. They're just different things when compared to things like Machine Learning. Despite (and your) my example, most of the time, when creating game AI you have to distill the rationale a player would have to a set of rules, and then build it from the ground up as a rudimentary intelligence that can make decisions. Sure, there's "shallower" games, but also games that distinguish themselves when good AI is in place. I keep thinking of the AI in Quake 1 bots, and when a game like S.T.A.L.K.E.R. had good opponents. It was refreshing.

I'd even say there's some beauty in it, especially when you get to some emergent behavior that you did not expect.

I think Machine Learning is all the rage today mostly because you can attack a problem using brute force, without having to understand what drives a behavior. It may be more human-like, but to me it's just a separate branch.

Re: AI Programmer’s Bookshelf

#20
post #10

This is about game AIs, which are definitely interesting. But for the most part they overlap very little with what most people think of as AI. In undergrad (mid 2000s) I partially specialized in both computer graphics and machine learning, and took a video game class to try combining these skills. I have two big memories from this time that stuck with me. The first is the time a dev on Civilization 1 visited our clas…

I had the same outlook, however it is for a game I am currently in development.

And for those who are reading this, and are interested in game AI with interest in making true machine learning integrated into their characters, I gope this will help keep you inspired.

So, like you, I had grandeous ideas and vision about adaptive, machine learning approach to controlling my character in a platform-based fighting game. They would learn from previous mistakes and improve themselves, to create a truly interactive AI, one that can challenge the player beyond just memorizing his pre-programmed state machine patterns or giving him inhuman reaction times. Then I ran into the same issues, the game must run at 60 fps, and constant learning cannot be done, so i've implemented a basic AI, but i know every way it will act, nothing is amazing.

Until one day I went back and looked at my AI approach, I realize I could still use machine learning, but perhaps use a smaller neural network, and a different learning algorithm. So, after implementing a combination of reenforcement learning and evolutionary learning. I let them train for a day. Then something amazing happened, and it 's what i imagine a parent feels when their kids learns to do something: it saved itself. Initially, starting out the AI would just spam buttons and usually end up jumping off the platform and killing itself, or stray away from the edge and just not touching the control stick, but this time, he got knocked off and he saved himself.

It was an amazing feeling, I never taught it to do that, but I gave it the ability to learn to do that, and that was extremely liberating.

So i encourage people to not give up on the ML AI for videogames, I know deep mind recently teamed up with blizzard to make a StarCraft2 AI, and that looks awesome.

Post reply on HN