Questions tagged [ai]

Artificial intelligence (AI) is the branch of computer science and technology that studies the development of machines able to simulate aspects of human intelligence.

Filter by
Sorted by
Tagged with
47
votes
1answer
2k views

Connect Four AI (Minimax) in Clojure

I wrote a Connect Four game including a AI in Clojure and since I'm rather new to Clojure, some review would be highly appreciated. It can include everything, coding style, simplifications, etc. But ...
24
votes
2answers
636 views

Where equations are born and mutants are buried

I've read up on genetic programming yesterday so I figured I'd try to implement something myself. I would like the main focus to be on whether or not I've implemented the idea behind it correctly. ...
23
votes
3answers
392 views

A scoring approach to computer opponents

This code is starting to be used within several of my projects, and therefore I thought it's time to get it reviewed. Description The most common application for this code is that there is a ...
22
votes
5answers
12k views

Tic Tac Toe computer AI

I am creating a TicTacToe game for my college project, and when I finished the code for computer AI, I ended up with a big chunk of code. It allows the computer to make the winning move, stopping the ...
22
votes
1answer
276 views

21: The number with the curse

The goal of this game is to not say the number 21. Rules: You must only say numbers consecutive to the previous said number. You may say 1, 2, or 3 numbers at a time. For example: Player 1 says 1 ...
19
votes
4answers
34k views

Simple Self-Learning AI

This is a programming challenge I set for myself a while back to create an AI that starts with no knowledge of anything whatsoever, and learns as you talk to it. (It can learn stuff like your name, ...
18
votes
2answers
474 views

The birth of my intelligent assistant: Khronos

I've done a lot of reworking to this main file recently, in regards to using a new speech recognition engine and integrating the last reviews suggestions. My question before is going to be phrased ...
17
votes
3answers
3k views

Who is this Chatbot?

Based off the coding puzzle: Who is this chatbot? The code's purpose is to create an AI that the user can communicate with. Due to there being no hard-coded strings, the AI learns from what the user ...
16
votes
3answers
2k views

92 Spoons AI, sort of an AI in C++

I have made an AI that takes a user input and returns a predefined value. It that stores its info in a file (with the name of the file "default.92ai"). I thought ...
15
votes
2answers
3k views

2048 (game) solver

The code contains an AI function, that searches breadth-first all possible moves and get the score of their grids, a depth of 6 is used which makes at most \$4+4^2+...+4^6\$ computed grids. The ...
15
votes
1answer
890 views

Tic-tac-toe in SQL with optimal AI

The simplest introduction to this code is to play it! Here's an SQL Fiddle. However, to enjoy it fully, you'll need a more interactive environment, like the psql ...
14
votes
8answers
8k views

Is my AI solution to Untrusted Game considered logical or “ethical”?

I am applying to a university to study Computational Linguistics, and as I read, it would be recommended to have a background in Artificial Intelligence. The Admission board asked me to prepare a ...
14
votes
3answers
1k views

Ncurses Tic Tac Toe with simplistic AI

I have read your rules and in particular the part about bite-sized portions, so I am apprehensive about posting this but want to do it anyway. I have recently begun getting into C and in particular ...
14
votes
1answer
4k views

Tic Tac Toe game that uses Minimax algorithm to pick the best move

I written a Tic Tac Toe game, which allows you to play against another person or the AI (The AI can also play against itself, which should always result in a tie). The AI uses the Minimax algorithm ...
14
votes
1answer
167 views

TicTacToe with AI in ruby - follow-up overload

I already posted this program numerous times, always surprised by the amount of improvement that is possible suggested by people here. Is it possible to make it even better, without nitpicking? At ...
11
votes
3answers
459 views

“AI” chat program

I've thrown together this simple chat program, and while it works. I think it could certainly use some improvement. Here's how it works. Obtain user input by removing all punctuation from the input ...
11
votes
2answers
2k views

AI bot Java dungeon game

I have written a script that allows a user to walk around a dungeon pick up gold and once they have picked it all up they can exit the game through an exit. What I am doing now is writing a bot to do ...
11
votes
2answers
6k views

Simple 2048 AI in Python

A few weeks ago, I wrote a Python implementation of 2048. Since then, I've been working on a simple AI to play the game for me. The code uses expectimax search to evaluate each move, and chooses the ...
11
votes
2answers
1k views

Neural Network appears to be slow

I have some neural network Julia code which I'm hoping to speed up. It's possibly simply poorly-designed, but I'm not convinced. ...
11
votes
1answer
506 views

A Tic-Tac-Toe game in MonoGame

I've started learning MonoGame and C# lately, so in order to get more confident with both and do something not completely trivial, I've built a Naughts and Crosses game. I am using 7.1 version of C# (...
11
votes
1answer
2k views

Yet another minimax tree for TicTacToe

I have written a working minimax tree for Tic-Tac-Toe. What I have done so far is create a tree with end node having value 10, 0 or -10 base on win, lose or draw. After I create a tree I then ...
10
votes
4answers
2k views

TicTacToe AI needs optimization

How do I condense this gigantic monster into something more manageable? I heard about command pattern but I can't figure out how to use it. What other solutions are there? ...
10
votes
2answers
4k views

AI Decision Tree

I created little decision tree, what do you think about it, what I can correct? I wanted to create a code for tree that looks in that way: My implementation: ...
10
votes
2answers
455 views

American Checkers with AI

This is the third question in the series. Number 1 had most of the official two-player rules implemented, and Number 2 was the basic UI. This one has the complete two-player rules implemented, an AI ...
10
votes
2answers
7k views

Connect 4 (glorified tic-tac-toe) implementation

I'm posting here my implementation of the game Connect 4. It's obviously a pretty trivial game and code but I'm primarily interested in any advice concerning improvements to the code structure: types, ...
10
votes
0answers
245 views

BattleShip - Ships & Players

I'm making a full-blown OOP Battleship game in VBA (previous post: Battleship Grid), and I want this code to be as good as it gets - and better, if I can. I've refactored a few things, introduced a <...
9
votes
3answers
2k views

Stock Monte Carlo Tree Search implementation to a simple connect 5 game in Python

Requires Python version: 3.6+ fstrings included! External link: https://github.com/thejhonnyguy/Python-Stock-MCTS (Questions below) Main program: mcts.py ...
9
votes
2answers
1k views

Color guessing code

This code is supposed to learn colors from many many data images, and then recognize color using an algorithm that I made. Eventually, I want the program to make its own algorithm. Data input and ...
9
votes
2answers
1k views

TicTacToe in Python3 w/ Simple AI

Here is my version of TicTacToe on python 3.x I'm learning python for a several weeks and I will be very appretiated if you take a look on my script and review it! P.S. I've used NumPad to input ...
9
votes
2answers
10k views

Aimbot for open-source FPS game Assault Cube

I am actually quite new to C++, although I have previously programmed in Java. Do you see any ways I can improve readability, maintainability and performance, and make it more object-oriented? ...
8
votes
3answers
17k views

“Ella” Java chatbot

I recently developed an interest in AI and thought I would develop this little chat bot. Are there any recommendations/modifications? ...
8
votes
3answers
933 views

Create a clever Specker game player

I am creating a game called Specker in c++. The rules are simple: There are \$p\$ players \$\left(0 \to p - 1\right)\$ and \$n\$ heaps \$\left(0 \to n - 1\right)\$. Starting with player \$0\$ ...
8
votes
2answers
2k views

Python neural network: arbitrary number of hidden nodes

I'm trying to write a neural network that only requires the user to specify the dimensionality of the network. Concretely, the user might define a network like this: ...
8
votes
1answer
2k views

2048 (game) solver 2.0

Follow-up of 2048 (game) solver I improved the script, using standard search methods like expectimax. Now it goes easily to 2048, but not really further, the difference with the highly efficient ...
8
votes
1answer
5k views

Genetic Algorithm in Python

I'm a new programmer, so any help is welcome. Preferably to make it faster, avoid heavy memory usage, and so on. ...
8
votes
1answer
214 views

Brute Force (and not) Bejeweled AI

My approach to solving the problem of selecting the best match on a bejeweled board is a fully object oriented approach. Some of the other relevant code can be found in my previous questions ...
7
votes
5answers
672 views

Tic Tac Toe in C w/ ncurses Revision

Someone in this thread said I could ask for a review of my revision: Ncurses Tic Tac Toe with simplistic AI I re-wrote it from scratch using the suggestions from the answers. In particular I did the ...
7
votes
1answer
19k views

Tic-Tac-Toe & counter against the player's moves and count scores

Here's a Tic Tac Toe program I wrote in C++. It can play (semi-effectively) against the player. Please give tips on how to improve. ...
7
votes
2answers
2k views

Anti-Bot comment system

With some advice from SO, I developed this system, which I think is quite strong for bots to automatically post comments. index.php ...
7
votes
2answers
258 views

BotClean challenge

I'm going through the artificial intelligence domain at HackerRank. I'm very new to this domain and I really need a guide on how should I minimize the number of if/<...
7
votes
1answer
122 views

AI Governor to Play a Strategy Game

I had the idea the other day to implement an artificial intelligence that could play my strategy game. This could be useful in a variety of different ways. For example, the player could "lose ...
7
votes
1answer
310 views

2048 game - AI can't score more than 256 average

I'm trying to implement AI for 2048 with MiniMax and Alpha-Beta pruning, based on a snake strategy, which seems to be the best as a single heuristics. Unfortunately, AI makes 256 in most games, what ...
7
votes
1answer
1k views

2 player chess game in C++

I have written a 2 player chess game in C++. Things I have accomplished so far: Legal moves validation Bit board generation Things I look forward to (would appreciate advice on them): Move ...
7
votes
1answer
136 views

Follow-up: C++ 'evolutionary AI' implementation

Based on the advice provided in my previous question, I would like to post the other source file that actually implements all the combat mechanics and also the actual evolution process. As with the ...
7
votes
1answer
474 views

An unbeatable Tic-Tac-Toe game using exhaustive enumeration of all cases

I am a beginner programmer and I've been trying to complete an unbeatable tic-tac-toe program, my code is below. The program itself works, but it seems rather inefficient, as I literally have to type ...
6
votes
2answers
724 views

Cleverbot Game in Java

This is a project I've been working on for a while. It's basically Cleverbot. What do you think? ...
6
votes
2answers
509 views

'Evolutionary AI' implementation

For the code sample that I am asked to submit with most of my job applications (usually Gameplay Programmer), I created this console application in which I attempt to figure out what is the best ...
6
votes
1answer
309 views

Dangerworld game

You can download the Dangerworld game in pre-alpha version and review the code. The particular issues I have are making the character walk over steps instead of sliding NPC AI how to make the enemy ...
6
votes
2answers
438 views

Another JavaScript Stack Exchange chat bot

I've been inspired by @SirPython's SirAlfred JavaScript chat bot, so I went and made my own. This one is slightly different though, in the fact that it can accept input in a more lenient way. For ...
6
votes
1answer
93 views

Minimax implementation of tic tac toe

I have the following working tic tac toe program. Someone said it's a convoluted mess and I'm looking for pointers on how to clean it up. ...