All Questions
9 questions
7
votes
2
answers
342
views
ASCII-based OOP blackjack game in Python
I'm new to programming and have been teaching myself to code for about 6 months. Since I have no one to ask about any of coding-related questions, I may have developed bad habits in the meantime, but ...
1
vote
2
answers
1k
views
Simplest possible Tic Tac Toe AI in Python
Last week I challenged myself to create the smallest possible code for a Tic Tac Toe game with an AI as opponent. Smallest possible in regards to say least number of characters used. The requirements ...
6
votes
1
answer
1k
views
Python: Astar algorithm implementation
I have implemented Astar algorithm for a problem on an online judge relating to maze given start and end positions along with a grid representing the maze. I output the length of the path along with ...
3
votes
2
answers
1k
views
Sorting cards by suit and value using Shell Sort
The question description
Put a deck of cards in order by suit (in the order spades, heart,
clubs, diamonds) and by rank within each suit, with the restriction
that the card must be laid out face down ...
8
votes
1
answer
238
views
Python port of Java dice game algorithm
I am in the process of learning Python (background in C++ and R). So after the obligatory "Hello World", I decided that my first non-trivial program would be a port of a Java implementation of the ...
6
votes
2
answers
2k
views
Battleships Player vs Computer Algorithm
I am a Year 12 student studying CS for my A-Levels. I have had previous Python experience but it is obviously not to professional/industry standard. Therefore, my goal for this review is for my code ...
14
votes
2
answers
5k
views
Battleship algorithm
Im looking to improve my search algorithm in my battleship game. Code is not perfect but would appreciate any suggestions or recommendations.
Running the simulation using a 100x100 grid (10,000 ...
12
votes
2
answers
8k
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 ...
9
votes
2
answers
2k
views
Calculating 24 from 4 numbers (math Poker game)
This is a game of math in Poker. Two people each have a pile of cards. They then each place 2 cards on the table at the same time. Every card is treated as a number. The players need to find a way to ...