15

To answer just your title, yes. Neural nets can give non-boolean answers. For example, neural nets have been used to predict stock market values, which is a numeric answer and thus more than just yes/no. Neural nets are also used in handwriting recognition, in which the output can be one of a whole range of characters - the whole alphabet, the numbers, and ...


15

Joel actually answered this one a few years back. The actual meaning of "teach a machine how to program by itself" is "teach a machine how to take a spec and create a program that corresponds to that spec." And with that in mind: The problem, here, is very fundamental. In order to mechanically prove that a program corresponds to some spec, the spec ...


15

I wish to write a chess AI which simulates the way I think over the board, using C++. Awesome! My focus is on writing the algorithms for choosing moves (decision making), not defining the board and pieces. Er, huh? To my knowledge, most chess programs written to date are focused on taking advantage of the computer's calculating powers Well yes, though ...


14

Since Tic-Tac-Toe is a solved game, I would recommend simply playing a perfect game every time. The following algorithm will allow you (or the AI) to always deny your opponent victory: Win: If you have two in a row, you can place a third to get three in a row. Block: If the opponent has two in a row, you must play the third to block the opponent. Fork: ...


12

Your example sounds similar to Bridge. Top Bridge-playing systems use Monte Carlo methods to select moves. At a high level: Determine the probabilities of each card being in a given hand. You know with certainty which cards are in your hand and which cards have been played. Determine the probability of all other cards based on cards that have been played ...


11

First of all, it seems to me you are missing (or perhaps misunderstanding) the "explicitly" bit in "without being explicitly programmed" (from the quote in the question). It doesn't mean that no programming is required at all, it means that you are not programming a specific solution to the problem, but instead what you are making is a more general program ...


10

"The best algorithm to achieve this"? Define "best". A simple A* algorithm will generate the most efficient possible path for an enemy to take to reach the player, but would you really want to play against a perfect computer? That's a recipe for frustration right there. The Pac-Man "AI" was actually 4 very simple algorithms that told the 4 ghosts where ...


9

Off the top of my head, the very classic, must-read, heavy book that will help you throughout your AI experience : Artificial Intelligence, A Modern Approach. Don't be scared by the size, this book is trying to explore multiple kinds of AI, and the authors warn that the reading of the entire book will need nearly a 2-semester period. If you want to focus on ...


8

Why you don't need to generate code What you are doing here is interesting as a learning exercise. Certainly there are worse ways to learn a language than by generating code in the language, with the language. Outside of that, there may not be many practical applications for generated code in a highly flexible, dynamic language like Lua. Anything you can do ...


7

Usually, such filters are programmed to output not only a yes/no value for each sample, but rather a probability: a sample may, for example, be reported as 95% likely to be abusive. Then you set two thresholds, to divide your results in three groups: very unlikely to be abusive, very likely to be abusive, and uncertain. For example, you might consider ...


7

A case of recent personal experience: I've been working on a card game myself (Bisca, a 2-player Portuguese game), and I've been getting good results using Monte Carlo methods, specially using the recent Information Set Monte Carlo Tree Search algorithm (ISMCTS, described with example source code in Python at http://www.aifactory.co.uk/newsletter/...


7

1) since the board has a fixed-size that you're just going to be feeding into an AI anyway, you could just represent it as a one-dimensional array with the right number of cells, where each cell represents a space on the board. Mapping that one-dimensional array to the screen for presentation might be a little weird, but it's a problem you only have to solve ...


6

Not an AI expert, but I do know some things about AIs in general, and about chess AIs. First, let's indeed note that there is no "best practice" for AIs, they can work in many different ways. Some approaches are better suited to some problems, and some problems have many viable approaches. Now, no, games like chess are definitely not played by considering ...


6

I'm not an neural network expert but I understand that identity mapping ensures that the output of some multilayer neural net is ensured to be equal to its input. Such a net is also called a replicator. I have understood that such identity/replication facilitates unsupervised training, and that the hidden layers of such nets can be used for feature ...


6

You are correct about AI which includes ML which includes DL. NN can indeed be included in ML, be it inside or outside of the DL context. An example for the latter is when neuronal nets are used in simple task based learning (e.g. recognize car number plates in pictures). Data mining is somewhat broader than your definition, because it's not only ...


6

Min-Max search (with or without ABP) is not supposed to "build the complete search tree" in memory. It is usually implemented as Depth First Search tree traversal, which traverses the complete search tree, but does not store it completely. In fact, at each point in time, there is only one node per level required in memory, so the memory usage is actually ...


5

If you are allowed to remember past data, A* is indeed your best bet. I used it on Google's Ant AI challenge, which only has a small radius of view. The main difference with a limited field of view is you do a lot more walking around just to explore, but that's unavoidable. A* will give you a pretty good list of where to explore, without having to visit ...


5

It's the same as it is in Algebra. An identity map or identity function gives out exactly what it got. When they say: h(xl) = xl They mean h is an identity mapping / function. If you give it xl it will give you back xl. h might be something else but once they say it's h(xl) = xl then it's an identity map / function. I don't see anything here to ...


5

To my knowledge, most chess programs written to date are focused on taking advantage of the computer's calculating powers (aka brute force method). My program will be different in that the focus is going to be on emulating human thinking (in this case my own way of thinking which is actually highly organized). There are quite a lot of possible chess games (...


4

You could also try BerkeleyX AI course that is available on edX. More info here: CS188.1x Artificial Intelligence I haven't taken this particular one, but the quality of presentation is generally very good. If you go through the archived course that already ended, you can just study at your own pace. However, if you register for the upcoming one you may ...


4

Sure, we do this all the time (for extremely limited subsets of problems). It is fairly trivial to imagine taking another step or two and tying something like Siri into the input of these code generators (or something like Wolfram Alpha) which in turn writes code and solves your problem. I would expect that something already exists somewhere to do the most ...


4

You are building a handcrafted AI Agent, often called an Intelligent Agent (IA); its 'environment' is the game, its 'sensors' are programmatic functions that gather input, its 'actuators' are also functions that output the keyboard/controls the game processes as input. To the best of my knowledge, if you are writing a handcrafted AI, a state-machine (SM) is ...


4

There are many approaches you can try: weaken the evaluation function break the eval up into two components: the first component is the standard score, the second component is a random value. Then you can use a skill parameter to weight how each component contributes to the final score for games with different pieces, change randomly the value of the ...


4

This is a good candidate for Differential Evolution. DE is a very simple (but powerful) population based, stochastic function minimizer/maximizer. A key point for integrating DE in your scheme is the fitness function: double fitness(Agent_k) fit = 0 repeat M times randomly extract an individual Agent_i (i <> k) switch (result of ...


4

You have good start. Each AI needs to be able to figure out "value" of current board. But it is often not enough. This is because calculating good "value" heuristic might be complicated and often current state of the board won't give you full idea about possible future developments. This is where algorithms that try to predict future exist. In your case, ...


4

You're building a training set. This is used to teach the AI what you want. The important thing is to be careful that the set doesn't contain false tells like a red and white checkered table cloth every time it's a pasta dish. We all generalize of course but when humans build training data it's amazingly easy to tip your hand without meaning to. Why ...


4

I would try to keep the TicTacToeGame completely UI agnostic. No observer, no publisher-subscriber inside that class. Only "business logic" (or call it "game-logic") inside that class, no mixed responsibilities which could lead to the complexity you scetched in your question. Instead, you could implement the turn-logic by utilizing your own event queue. I ...


3

Compilers cannot divine your intent, that's why. Have you ever gotten some obscure error like Cannot infer the type of x only to find out you were missing a semicolon or comma? That's because the compiler doesn't have something it needs (a critical token), but it doesn't know why. If it can't figure that out, how's it supposed to figure out that you ...


Only top voted, non community-wiki answers of a minimum length are eligible