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
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 ...
2
votes
4answers
438 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
514 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
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. ...
4
votes
2answers
11k views

Tic-Tac-Toe game using the minimax algorithm

I have written a Tic-Tac-Toe game in Python that contains, among others, a player that uses the minimax algorithm. I am not exactly a beginner at Python, but I'm not very experienced with it - so I ...
2
votes
0answers
254 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 ...
5
votes
2answers
3k 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
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. ...
6
votes
1answer
430 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 now ...
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 ...
3
votes
1answer
72 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
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. ...
15
votes
1answer
887 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
391 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 ...
5
votes
1answer
464 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 ...
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 ...
6
votes
1answer
583 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 ...
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 ...
2
votes
1answer
4k 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: ...
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 ...
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 ...
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 ...
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 ...
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: ...
5
votes
1answer
194 views

PseudoBrain FizzBuzz Thoughts

Some recent discussions on this site involved the Fizz-Buzz game - I have never actually implemented this, but for the record this is what I put together: ...
4
votes
2answers
6k views

Tic-Tac-Toe optimization 2.0 with AI

Previous question (without AI): Tic-Tac-Toe optimization This new code has a main file, a base game class, and two derived human...
1
vote
1answer
256 views

Ruby Tic-Tac-Toe using classes

This is Tic-Tac-Toe using negamax for AI. Help me make it better! Some sore points are: ...
2
votes
2answers
13k views

Minimax Alpha-beta code for Java

Not so long ago I learned how to implement the minimax algorithm with alpha beta pruning, and even created a perfect Tic Tac Toe player. How can I improve this? ...
6
votes
1answer
308 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 ...
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? ...
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 ...
5
votes
1answer
987 views

Java alphabeta search

Is this code correct? This code was adapted from this alphabeta pseudocode. AlphaBeta search is often mentioned but getting the code 100% correct is tricky. IGame...
5
votes
1answer
11k views

Optimizations to 8-puzzle

I am a CS student about to enter my junior year. I am attempting to get better and better at programming and thought that this would be a good place to toss my code out there to see if some of you ...
4
votes
1answer
3k views

Academic implementation of artificial neural network

With some free time, I decided to study artificial neural networks as an academic exercise (not homework). Over the course of my studies, I decided to write a Python application that would allow me to ...
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 ...