← Blog Home

Snack Break 26: A Simple Game of Skill

The last snack break may have been a little too difficult or a little too technical, so this time we're stepping it back it some with a much simpler challenge.

But first, the "winners" of 25!

Last Challenge

Snack Break 25 asked for a function that takes a list of integers and returns a multi-dimensional array with those integers as the sizes of each descending dimension.

Only two people submitted their solutions this time, and neither were able to create a fast solution for the last bonus, and one did not correctly understand the problem.

Snack Break 26: A Simple Game of Skill

This Snack Break is brought to you by me!


Write an AI that can play Connect 4. Part of this challenge is first creating the game of Connect 4, as well as a user interface to actually play it.


The AI should execute its moves without any noticeable "calculation time" beyond network latency. To make this concrete, all decisions my the AI should be made within half a second at absolute most.

The game should be playable on ROBLOX. It does not need to support Player vs. Player games, only Player vs. AI.


  • Make boards larger (or smaller!) than 7x6 that the AI can play on dynamically.
  • Use different requirements for the number of pieces to get in a row to win.
  • Add difficulty settings E.g. Easy, Medium, and Hard.
    • Have one setting, Impossible, that is actually impossible to beat!


The best way to submit your code is to PM me a link to an un-copylocked ROBLOX Place or Free Model that I can take.

You can also @adark in the Scripting Helpers Discord when I'm online!

The deadline for this Snack Break is 11:59PM UTC on Thursday, September 21st, and the "winners" will be announced with the next Snack Break the following Friday!

About the Author

Valentine Albee - ROBLOX Developer and Professional Programmer

Feel free to shoot me a message on Discord!
Ideas and questions are always welcome. :)


Leave a Comment

CootKitty says: September 11, 2017
This seems like it'd take a long time. I thought these were suppose to be quick to solve, generally o.O
hiimgoodpack says: September 12, 2017
Hmm. Adding difficulties would be hard.
adark says: September 16, 2017
I apologize for the late response! This challenge is fairly long, and not "solvable" per se. An AI is as simple as randomly playing moves on the AI's turn. Making a *good* AI is a lot harder, which is why it's actually in the bonus!
hiimgoodpack says: September 18, 2017
Oh. I thought the AI had to make an actual working one, not just an random one.
chess123mate says: September 21, 2017
Just in case my message wasn't received, I'm submitting my game: https://www.roblox.com/games/1058324608/Customizable-Connect-4-vs-AI
CootKitty says: October 6, 2017
This board game has more to do with strategy than skill.
showbobandvagenapls says: January 22, 2018
I like food
dispeller says: March 18, 2018
"Snack Break" ok now make an entire game pls and tnx