What is an Adversarial Search Agent? | Learning Intelligence 2

Daniel Bourke studies adversarial search and game-playing AI, covering minimax, alpha-beta pruning, and evaluation functions. He's building an agent for Isolation with a deadline of October 3, and reflects on AI as "hacks to exponential problems" while juggling Python practice and the AIMA textbook.
Chapters
Whoa, what a day of learning it's been. What's going on everyone? So today I went over lesson 7 and 8, or almost finished lesson 8 of the Udacity Artificial Intelligence Nanodegree. Lesson 7 was an introduction to game playing, uh, and lesson 8 was advanced game playing with artificial intelligence. So if we look what we went over, lesson 7, main topics: adversarial search, minimax algorithm, alpha-beta pruning, evaluation functions, isolation game player, multiplayer, probabilistic games, And then we did a whole bunch of game tree analysis. This was all new to me. I don't even know what it is. We're trying to build an artificial intelligence. This is my next pro— project actually, building an artificial intelligence to play the game Isolation. I won't go into the details of that game yet, but, uh, I would say Google it if you want to find out more. It's called Isolation. And then a bit more, uh, iterative deepening, more game trees, a few formulas, and then some cool notes from one of the lecturers, Thad. I'm not sure of his first name, but he's a lecturer on artificial intelligence at Georgia Tech. So, very smart person, smart guy. And he was talking about artificial intelligence. One of the joke definitions that AI researchers say, say sort of in the field, is that artificial intelligence is the study of finding hacks to exponential problems. And that's true, right? And so, and he defined exponential problems as being NP-hard problems. And I googled NP-hard because I didn't really know what it meant. And essentially it just means an extremely hard problem that would otherwise not be able to be solved in any normal way. So, well, any non-Turing thinking. And I probably butchered that definition, but just imagine it as a really hard problem. So, and he also went over the point that once something does get solved with artificial intelligence, it's no longer considered a problem for AI. So, for example, The battery in your iPhone, the software on the iPhone uses machine learning and artificial intelligence to lengthen the battery life, to make sure you get the most out of the battery of your iPhone. And although it still only lasts a day, the techniques are, sometimes less, the techniques used for it were once considered cutting-edge artificial intelligence. But now, we sometimes sort of can take these things for granted because they're just built within the software themselves. So let's have a look. What do we got here? So we've got a project coming up in the next 20 days. That's due. I've got to build an adversarial search agent to play a game from scratch, apparently. So that's going to be a big step up for me. I also started doing some Python programming on DataCamp. If you've never seen DataCamp before, I'd highly suggest checking it out. So far, I've gone through a bunch of Python knowledge, just over the fundamentals, because I figured I need to improve my ability to program in Python if I'm gonna make it through the end of this course. So, I'm looking for resources to improve my Python programming skills. If you've got any books, courses, etc., that you'd like to recommend, leave it in the comments. I'd love to try it out. And I'm awaiting my order of the artificial intelligence textbook, or Artificial Intelligence: A Modern Approach. And if you want, go to this website, abebooks.com. You'll probably find a cheaper copy of a lot of books that you may be searching for, especially textbooks. Well, in my experience, textbooks, uh, because you look here, US $27, that's about $35 Australian versus $85 Australian on here. And fair enough, I did buy an international copy. The seller did say it's in English, so fingers crossed. That's— I should be getting that within the next week or so. But I've done enough coding, I've done enough learning for today. A friend's coming over, we're gonna get some food, or make some food, and then I'll get back into it tomorrow. We can tick off advanced game playing from the list on the Trello board because I just finished lesson 8 of the Udacity AI Nanodegree. So that means I'm up to the project stage, which is building an adversarial search agent. So I don't entirely know what an adversarial search agent is yet, but I will promise you I'll find out. I've got about 3 weeks to complete this second project before the due date and I was a day or so overdue for the first project, so I'm going to make sure that I get this one done by the due date, or at least put in my best effort as best I can. And so, I think I'm going to go over the last two classes again, actually the last two lessons, because I didn't fully understand them, so I kind of breezed through them a bit faster than usual, and I'm going to go back over them, Lesson 7 and 8, Game Playing and Advanced Game Playing, to grab a deeper understanding. 'Cause look at this stuff. I've never seen these in my life. These are advanced game trees or probabilistic alpha-beta pruning. So I've got a lot of reading to do, which is a good thing actually. A delivery just came. Check this out. This is like Christmas for me. And I pre-opened this for the, for the vlog, but it's still wrapped up in cardboard. Artificial Intelligence: A Modern Approach. You can't see artificial, but just trust me, that says intelligence, a modern approach. So I've got a few readings to do. I've been stocking them up over the past few days, haven't— because I haven't had the textbook, it just arrived. So I've got to go through optional reading. I'll do that anyway. Chapter 5.1 to 5.2, and then another reading, 5.3 to 5.4, and then another reading on a paper about multiplayer alpha-beta pruning. So I'm going to get some food, I'm going to do some writing, and then I'm going to get into some reading, and I'll catch you when I finish that. Just finished learning about adversarial search. I've got a bit of a definition here for you guys as well. I know before I couldn't really define it properly. So adversarial search is where in which we examine the problems that arise when we try to plan ahead in a world where other agents are planning around us. So essentially a competitive game. That's adversarial search. So, if you imagine I'm player 1, I'm trying to win the game, I'm trying to find a way to win the game. Player 2 is trying to find a way to stop me from winning the game. So, that's adversarial search. I think it's just a— I was thinking of it as far more complex than what it actually is. And that's what this textbook, I think, a lot of the terms are a lot more complex than what they actually all sound a lot more complex because I'm not used to the terminology. And I've just done— finished some reading on, I don't know, a little bit of the chapter, a little bit of one of the readings I was supposed to do for the Udacity AI Nanodegree, and the textbook is exactly how you could imagine. Extremely dense. Well, dense for me because I'm new to this field, but I'm sure a lot of you are a lot smarter than what I am. So that's it for study for today. I'm going to have a shower because I'm a bit sweaty after gym and going to get back into it tomorrow. Today was mostly about planning. I went over the things I have to do for my second project in the AI Nanodegree, as well as a little bit of, uh, coding in DataCamp to to work on my Python skills. I finished the Intro to Data Science, or Python for Data Science course on DataCamp, and I'm still yet contemplating whether I want to sign up to go through with the Intermediate Python. There are a few more courses on there that I'd like to do, but I think I'm reaching the extent of my free, uh, free subscription or free account status. So I'll go through that a little bit more, find out if it's worth it or not, and if it is, I'll keep going. I think learning more Python Couldn't hurt either way. This is what I've come down to with my Project 2. This is in Evernote. I've just essentially listed a mud map of the things I have to do. So goal, some resources, rules, instructions. I've broken down this project. It's got two parts: coding and analysis, where essentially I have to code an AI to play as an adversarial agent in the game Isolation. And then part 2, which is research review, where I have to read a game-playing paper or from one of the, one of these, Deep Blue, AlphaGo, or one of my own. I think I might try and read the one on, if AI, sorry, if OpenAI have published their paper on the Dota 2 agent, I'd love to read about that. So maybe that will be the research review that I do. I have to do a one-page summary on that paper. And so you can see here on the Trello board, I've broken it down into a few little subtasks rather than just one big task. We've got part 1, coding analysis, a few steps there. There, have to do a few basic functions. Well, actually not basic, but whatever. And then a few custom functions and then part 2. So that'll be my main, uh, concentration for the next couple of weeks until it's due. I believe it's due on October 3rd. So I'll be working towards that, uh, each try and do a little bit each day, take some days off here and there. And yeah, that'll be my next step. Today I finished the free courses on DataCamp for the Python programming. I'm up to the intermediate section now. However, it's not free anymore. So I'm considering whether or not to sign up for a DataCamp membership to go through, uh, and their data science track. And they're sort of— they've partnered with Pluralsight as well, which is another online learning company. It's $37 a month for me to sort of have access to all of their paid courses. And, um, so I'm contemplating at the moment whether or not to sign up to practice keep improving my Python programming, I, I know for a fact it won't hurt. I probably will end up signing up. However, I also did start a Patreon page, so if you want to support my studying journey and help me sort of fund new creations and fund new videos and whatnot, I'd love to see you there. So, I'll put the link in the description. It's just patreon.com/MrDBurke. If you haven't heard of Patreon, it's a platform where you creatives like me and yourself even can go on and get funded by the fans rather than relying on ad revenue all the time. So I'd love to see you there. Also, I've been working on a blog post going in more in depth of what my curriculum is for my self-created AI master's degree. So you can expect that in the next week. I'll post that on all my social media channels. There'll be links, will be in the description. But otherwise, this is the end of video 2 of the Learning Intelligence series, and we'll catch you next week. Happy learning.
More from Daniel

Small Language Models (SLMs) Are the Future: Fine-Tuning AI That Runs on Your iPhone

Introducing Sunny - A MedGemma-Powered Skin Health Tracking App (Kaggle Competition Entry)

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 4 - Comparing the results

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 3 - Running LLMs on the RTX 4090

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 2 - Formalizing the tests

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 1 - Creating a series of tests

Local Multimodal RAG on the NVIDIA DGX Spark | Part 4 - Publishing our demo to Hugging Face

Local Multimodal RAG on the NVIDIA DGX Spark | Part 3 - Putting it all together


