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

learn more… | top users | synonyms

6
votes
1answer
72 views

Video Game AI State Change

I have here a snippet of code from a simple video game AI enemy. The basic idea behind the enemy is that he can be in one of a few states. By default he is in a patrolling state, where he moves ...
1
vote
1answer
26 views

Obstacle avoiding AI java

I have made a game in java that involves two players to fight each other with spaceships. For one player mode, I have programmed a simple AI to avoid allies and asteroids and go straight towards the ...
6
votes
2answers
195 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 ...
11
votes
2answers
306 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 ...
7
votes
2answers
89 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 ...
2
votes
0answers
49 views

AI for depth-first walking in a maze, with variable depth look ahead search for dead ends and finish point

This code is a part of a little game I've started a week ago. It is too extensive to review at once, so I'm picking the most interesting and crucial parts. Start with the AI. It has public update ...
4
votes
2answers
116 views

Sudoku solver using forward checking

I was compelled to look into a Sudoku Solver in Java using the principles I have learned in a course, namely I wanted to make something that included backtracking and forward checking. Has anybody ...
1
vote
0answers
23 views

Super Resolution in the Wolfram Language, Attempt 2

This is a wolfram language program I wrote for super-resolution, in this case meaning to guess at how to increase the the resolution, and so detail shown in a raster image such as a photograph. It ...
4
votes
2answers
101 views

Chess programming algorithm minimax to Alpha Beta

I have written some code for alpha beta for Chess programming and not sure completely if that is the correct way to do it. Can someone please tell me if I implemented the ...
4
votes
1answer
97 views

Neural Network Simulator with OpenMP

I wrote a simple neural network simulator (the biophysical kind) from scratch, and was hoping to get some feedback on how I can speed things up, or any C++ / compilation best practices that I can ...
3
votes
1answer
74 views

Pitting two Blackjack bots against each other

I'm taking part in this Daily Challenge on http://www.reddit.com/r/dailyprogrammer/comments/29zut0/772014_challenge_170_easy_blackjack_checker/ Basically, you have to develop a program that runs two ...
3
votes
1answer
98 views

Optimizing a Tic-Tac-Toe AI

I built a Tic-Tac-Toe game in Python. The board is made of ASCII characters and it is the user versus an AI. The user chooses a number (1-9) and if the corresponding spot is open then either an 'X' or ...
4
votes
3answers
169 views

Evaluation function for Connect Four

Here is some code I have written as a connect four negamax evaluation function. The state of the board is stored inside a class state. ...
5
votes
1answer
572 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 ...
5
votes
1answer
230 views

Minimax for Tic-Tac-Toe

I have written AI for Tic-Tac-Toe using Negamax in JavaScript. The Negamax object is translated from an implementation written in Python. The code runs on a Node.js server and the player interacts ...
14
votes
2answers
687 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 ...
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? ...
14
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 ...
8
votes
1answer
114 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 ...
6
votes
3answers
555 views

Does this Tic-Tac-Toe game follow abstraction and encapsulation?

This below program will be further enhanced for TicTacToe game with Human and Computer as players. Currently this program is written for choosing best move for a ...
4
votes
0answers
176 views

JavaScript/Angular TicTacToe Minimax AI

I am interested in getting some feedback on the code for my TicTacToe game, implemented with Angular, particularly with respect to the AI logic, which is printed below. (The full code base is ...
2
votes
3answers
147 views

Pong game with AI

I have written a pong game in C++ using SDL2.0 for the graphics. I have a couple of questions regarding this code: How can I make the AI better, in such a way that it is actually dumber? Right now, ...
3
votes
1answer
180 views

Improving AI for a Connect 3 game

I am attempting to complete an assignment, which is basically Connect 3, instead of the classic Connect 4 game. The AI I am using is the exact same as the opponent, but the opponent wins more because ...
6
votes
2answers
1k views

Enemy patrol script using NavMeshAgent

I'm piecing together an Enemy script to attach to my characters. This is the portion that related the a game objects ability to patrol to given locations. ...
5
votes
3answers
2k 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? ...
18
votes
2answers
537 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. ...
1
vote
0answers
66 views

Neural Network in Julia

I am currently trying to implement a Neural Net in Julia with the goal of eventually implementing a stacked autoencoder. My code seems to work but I would appreciate any constructive criticism. If ...
11
votes
1answer
683 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 ...
2
votes
4answers
115 views

Counting game with hardcoded AI

The previous failed attempt This question derives from this other question I made. In the previous question I tried to use a Monte Carlo algorithm; sadly it did not work. I am doing an hardcoded AI ...
5
votes
1answer
103 views

Monte Carlo AI in 21 game

I am very interested in the Monte Carlo AI. I tried my best, still, this AI plays very badly. This code "works" in the meaning that it does not crash, but the quality of play is extremely low. Have ...
7
votes
1answer
2k views

Tic Tac Toe with an “algorithm” which can counter 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. ...
2
votes
0answers
85 views

Super Resolution in the Wolfram Language

This is a wolfram language program I wrote for super-resolution, in this case meaning to guess at how to increase the the resolution, and so detail shown in a raster image such as a photograph. It ...
4
votes
2answers
370 views

Value Iteration Implementation for MDPs

I've been working for a while on a decision theory library, and since I've never really had any formal training in code best practices I'd love to hear your feedback. This particular class is one of ...
11
votes
2answers
542 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. ...
6
votes
1answer
174 views

Full clone of the game Pengo

Use these links to understand the code I'm posting below since although it looks like PHP it is not: Function Reference Language Reference I have been making a programming language for some time ...
7
votes
1answer
93 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 ...
3
votes
1answer
57 views

Revised worker movement AI for strategy game

A while ago I posted this question about worker AI and Job Queues for a strategy game. I have posted other questions about the Job Queue, and now I would like to post this revised question about ...
8
votes
1answer
418 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. ...
11
votes
1answer
200 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 ...
4
votes
2answers
255 views

Worker AI and Job Queue Management for Simulation Game

So I've been working on AI for a Tower Building simulation game for quite a few days, and I think the code would really benefit from review. I'm a hobbyist programmer, but I really care about doing ...
17
votes
4answers
955 views

Refining AI movement logic

I have the below class which moves the AI towards the given plant, this works well however it feels really messy. Any input as to a better way to lay out the logic would be really grateful, the logic ...
5
votes
1answer
382 views

Revised: AI for 2048 in Haskell

This is a revised version of an AI for the game 2048, written in Haskell. Link to original thread: Poor AI for 2048 written in Haskell I think this version is a lot cleaner, thanks to the tips from ...
13
votes
8answers
7k 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 ...
6
votes
1answer
382 views

Poor AI for 2048 written in Haskell

I'm learning Haskell and thought it would be fun to write an AI for the game 2048 in Haskell. In my implementation I got rid of the randomized aspects of the game. This makes the program ...
20
votes
2answers
204 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 ...
2
votes
1answer
2k views

Turning 1D array to 2D array in TicTacToe

To check a win in my TicTacToe game, I have created a 2D array that contains all the combination that a game can be won in, like so: ...
17
votes
5answers
6k 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 ...
10
votes
2answers
692 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 ...
3
votes
2answers
360 views

Organising code for a genetic algorithm in Python

After programming in Haskell for a while, I've gotten attached to a functional style. This is clearly evident in the code for my genetic algorithm. Could you provide me with some hints as to how I ...
7
votes
1answer
120 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 ...