Snack Break 26: A Simple Game of Skill
Posted on September 8, 2017 by adark
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!
Challenge
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.
Constraints
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.
Bonuses
- 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!
Submissions
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
- Discord: FuriousProgrammer#0842
- Twitter: @FuriousProgramm
- ROBLOX: adark
Feel free to shoot me a message on Discord!
Ideas and questions are always welcome. :)
Commentary
Leave a Comment