Five-in-a-row game, with deep-learning AI

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
deep_remi
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Mar 23, 2022 9:17 pm
Contact:

Re: Five-in-a-row game, with deep-learning AI

Post by deep_remi »

Yes, sorry, the saved game was lost in a server hard-drive failure 2 years ago, and I do not have a backup. You should be able to create one from the blueprint (make sure to zoom out first, because Factorio does not handle such a huge blueprint very well).
mmmPI
Smart Inserter
Smart Inserter
Posts: 4851
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Five-in-a-row game, with deep-learning AI

Post by mmmPI »

It is possible to recreate the map from the blueprint BUT that require loading a pre 2.0 version of the game where there are still "rocket control unit" in the game, or else the signal is missing and the blueprint has some holes in it and also to unchart quite a lot of area before attempting to paste the blueprint, it's not that big that it's impossible to import, but it's big enough that it's a pain to paste a second or a thid time over the first one if parts were missing.

The experience of loosing against a blueprint that only has 64 neurons hasn't changed :o
Check out my latest mod ! It's noisy !
deep_remi
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Mar 23, 2022 9:17 pm
Contact:

Re: Five-in-a-row game, with deep-learning AI

Post by deep_remi »

Did you manage to make it work? If you have a saved game for the new version, then I could host it on my web site. I removed Factorio from my computer, and promised to myself to never install it again, because I was wasting too much time.
Tertius
Smart Inserter
Smart Inserter
Posts: 1514
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Five-in-a-row game, with deep-learning AI

Post by Tertius »

The original blueprint contains satellite and rocket-control-unit items and is incomplete if you import it in 2.0.

I decoded the blueprint, replaced the items with tungsten-carbide and tungsten-plate and recreated a blueprint. It imports without errors and can be placed on a map in map editor mode, however I don't know how to play and how to see if it works correctly.

If to be used without space age, you probably need to replace the items with something non-space age related, probably with one of the new virtual signals. But since for a virtual signal the signal type is to replaced as well, I didn't do this since I just used text search&treplace. With jq it should be quite easy to replace both if you're able to create a corresponding jq filter, but since I'm about to leave for my new year's party I'm unable to finish this :mrgreen:
Attachments
bp.txt
(5.76 MiB) Downloaded 8 times
deep_remi
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Mar 23, 2022 9:17 pm
Contact:

Re: Five-in-a-row game, with deep-learning AI

Post by deep_remi »

Thanks for your effort.

You can play by dropping stone bricks into steel chests, as shown in the YouTube video.

IIRC, some letter signals from the end of the alphabet may still be free to use. I will try to make a new version for Factorio 2.0 during the week end, after all.

Have a nice new year party!
Tertius
Smart Inserter
Smart Inserter
Posts: 1514
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Five-in-a-row game, with deep-learning AI

Post by Tertius »

I employed Chatgpt to get me a better signal replacement with a jq filter, and here are the results. I used shape-horizontal and shape-vertical as signal replacements for satellite and rocket-control-unit.

Save file for vanilla Factorio 2.0 with the imported blueprint, ingame game can be started:
gomoku 4.zip
(18.78 MiB) Downloaded 4 times
(It acts differently than in the video and it's quite dumb, however it adheres to the rules, so I guess it's working correctly in general)

Resources:

Original blueprint for 1.1 (not suitable for Factorio 2.0)
gomoku_blueprint.txt
(5.09 MiB) Downloaded 4 times
Fixed blueprint for 2.0 (vanilla 2.0 without Space Age and mods)
gomoku_blueprint-fixed.txt
(5.76 MiB) Downloaded 4 times
Blueprint tools (bash shellscripts, remove *.sh.txt and chmod +x, requires coreutils and openssl)
bpdecode.sh.txt
(242 Bytes) Downloaded 6 times
bpencode.sh.txt
(177 Bytes) Downloaded 5 times
jq filter
gomoku-jq-filter.txt
(318 Bytes) Downloaded 4 times
jq call to fix decoded blueprint
fix-bp.sh.txt
(143 Bytes) Downloaded 5 times
mmmPI
Smart Inserter
Smart Inserter
Posts: 4851
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Five-in-a-row game, with deep-learning AI

Post by mmmPI »

deep_remi wrote: Wed Dec 31, 2025 1:36 pm Did you manage to make it work? If you have a saved game for the new version, then I could host it on my web site. I removed Factorio from my computer, and promised to myself to never install it again, because I was wasting too much time.
Unfortunatly, i only have a working save game for the 1.1 version
gomoku for factorio 1.1.zip
(12.84 MiB) Downloaded 5 times
does behave like in the video !

Factorio does takes a lot of time, but when considering the other things i do with said time, it doesn't feel like a waste to me :)
Tertius wrote: Wed Dec 31, 2025 4:16 pm The original blueprint contains satellite and rocket-control-unit items and is incomplete if you import it in 2.0.

I decoded the blueprint, replaced the items with tungsten-carbide and tungsten-plate and recreated a blueprint. It imports without errors and can be placed on a map in map editor mode, however I don't know how to play and how to see if it works correctly.
I was about to say thank you and ask for how you did it, because i would suggest "not" using space age item , to make the lightest possible 2.0 version, and i see you gave the ressources you used later, but when attempting to play with your version in 2.0 i noticed it didn't behave like the video, i think something went wrong in the update because really the AI isn't like you say :
Tertius wrote: Thu Jan 01, 2026 4:02 pm (It acts differently than in the video and it's quite dumb, however it adheres to the rules, so I guess it's working correctly in general)
The AI choices are deterministic, there is no randomness or pseudo one based on any time or anything like that, so if it doesn't behave like in the video, to me, it means something went wrong, but there are like 150K entities so it's not easy to figure out what. And i don't know how to use the debug screens on the right side or if they are useful in that situation.

The AI is VERY GOOD, you may need to do a little research about the gomoku narabe rules, especially the starting positions, because i think you have to do the first move on behalf of the AI, i don't remember for sure if that's because otherwise the AI would always do the same first move, or if that's because the game when played has different starting positions depending on handicap or things like this but if you try to start like in the video, placing the stone brick in the same chest in the same order, i don't think you can beat the AI in the version "1.1"
Check out my latest mod ! It's noisy !
Post Reply

Return to “Combinator Creations”