PyConnect-4

PyConnect-4

10 devlogs
26h 2m
•  Ship certified
Created by vindognz

PyConnect-4 is, you guessed it, Connect-4 made in Python.
It features a CLI and GUI version, both with a CPU (minimax algorithm) that is very good.
(for some reason it is really bad on the GUI one but really good on the CLI one idk)

Timeline

Ship 1

1 payout of shell 309.0 shells

vindognz

7 months ago

vindognz Covers 10 devlogs and 26h 2m

I did a ton of work on the GUI, and implemented the CPU though very janky. There are still bugs in the GUI version, but I really want to ship it now as I've spent far too long on this project so far, and the CLI version works just fine.

Final devlog before shipping!

Update attachment
vindognz vindognz 7 months ago

oh btw the star should only be on the last tile placed, but ig i broke that when implementing the ai so…..

there is a cursor at the bottom that you can move with the keyboard (and it moves with the mouse)
added a little star icon to show the last dropped tile for the people not paying attention.

Update attachment

Added a turn indicator so you know whose turn it is (for those who aren't paying attention to the game).
Made it so the background colour gets drawn to the screen every frame, so there are no artifacts when I change the size of a button for example.
Nice and short devlog, but some good progress.
Next up: implementing the CPU!

Update attachment

ive been cheffing it up.
implemented win detection,
less janky draw detection,
upgraded menu manager class = cleaner code and fun lambdas.

Update attachment

Gui version is looking good. Polished and significantly optimized the code (prevents making the buttons every frame). the board itself looks good, with draw detection but no win check implemented yet. i keep forgetting to make devlogs, but this is what ive been up to !

Update attachment

I forgot to make a devlog for a while, but i tweaked the algorithm a bit, added a settings system so you can configure the search_depth of the algorithm and the display mode (coloured text, coloured " " chars or emojis). i also started working on a gui version.

Update attachment

🚨 MINIMAX ALGORITHM IMPLEMENTED 🚨
it is VERY strong and might play perfectly (i am very very very happy)

Update attachment

I spent ages on a Neural Network that was supposed to be good, but it was absolutely terrible. As a result of this, I deleted all the code and now am gonna try to implement minmax algorithm with alpha beta pruning.

Update attachment

Added LAN multiplayer (or online if you can port forward). It works using Python socket, bound to 0.0.0.0 on a really niche port so it won't interfere with anything.

Update attachment
WheeledCord WheeledCord 8 months ago
tuff

First devlog! I started the project yesterday, and got a basic board layout using nested arrays in ~1 hour (I hadn't installed the wakatime plugin yet 😭). Dropping was completed around 30 minutes later, after fixing some bugs. Around 2 hours in I installed the plugin and completed a checkWin() function. I don't know of any bugs at the moment, and it is completely functional for multiplayer use (sharing one device).

Update attachment