Adam Danz
Adam Danz
Última actividad alrededor de 1 hora hace

This Week's Quiz 57 responses
Inicie sesión para participar
David
David
Última actividad alrededor de 6 horas hace

Want to try an AI coding agent for the One-Button Game Contest? In this post, I'll show you how to connect OpenCode to MATLAB and use it to create your first game. You can get everything set up and start building in less than 20 minutes.
Here's what you'll need:
For those who already have local coding agents like Claude or Codex, you can skip a few steps but will still need to ensure the MCP connection to MATLAB and leverage the contest starter project from File Exchange.
Selecting an LLM
Here is a list of OpenCode's cloud-hosted models: https://opencode.ai/v2/docs/console/models#free-models. These can change unexpectedly and your requests may be rate limited, but I haven't run into any issues so far. Starting with a cloud-hosted model means you don't have to install additional tools or download rather large model files.
I'll be using GLM-5.3-Flash. The documentation says "Its provider follows a zero-retention policy and does not use your data for model training" which is nice.
If you'd prefer to use a locally running model, likely for security reasons, and if your hardware supports it, follow the instructions here: https://github.com/matlab/matlab-local-agent-quickstart.
Configuring OpenCode
You've installed the MATLAB MCP server but OpenCode doesn't know about it yet. You'll need to find or create a configuration file to make that connection. The file is named opencode.json and can be found (or created) in the .config directory in your user path:
C:\Users\<username>\.config\opencode\opencode.json
This is an example for a Windows system:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"matlab": {
"enabled": true,
"type": "local",
"command": [
"C:\\Users\\<username>\\.matlab\\agentic-toolkits\\bin\\matlab-mcp-server.exe",
"--matlab-root",
"C:\\Program Files\\MATLAB\\R2026a"
]
}
}
}
Note: The path to MATLAB only needs to point to the directory, the executable is appended automatically by the MCP server.
Verify the MCP connection
  1. Restart OpenCode and verify the connection to the MATLAB MCP server is working. MATLAB doesn't have to be running for the connection to work.
  2. Navigate to File > Settings > Extensions > MCPs. You should see MATLAB listed and toggled 'on'.
Note: Ensure you've selected the model you want. You can do this using the list box below the prompt. The following image shows that GLM-5.3-Flash Free is selected.
You can now create your first OpenCode session and ask "Can you connect to MATLAB?" or "What tools are available via the MATLAB MCP server?". If it's working you should see the agent response acknowledging it can connect to MATLAB.
Creating a game
In this step, you''ll use OpenCode to create a MATLAB game by simply having a conversation. You'll see MATLAB open and edits being made to the game.m file. At any time you can edit the MATLAB code or simply tell the OpenCode agent what you want changed.
  1. Download the starter kit from the File Exchange if you haven't already done so. Clicking on the New Entry button in the contest pages also provides the link: https://www.mathworks.com/matlabcentral/fileexchange/185098-matlab-one-button-game-minihack-starter-project
  2. Extract it to a directory of your choice. Then, open the project (.proj file) in MATLAB. Doing this runs a bootstrap function that installs dependencies.
  3. Create a new OpenCode project by selecting the Add project link/button, then select the directory for the contest starter kit. OpenCode needs to know where on your system to create the new session.
  4. Create a new OpenCode session, double check your model choice is visible, and then simply tell OpenCode what you want to do by typing in your request. For example, "I'd like to create a one-button game for the MATLAB Central contest. Can you suggest an idea?".
  5. OpenCode may ask clarifying questions and spend a few minutes 'thinking' (you can click and expand these UI elements to see what it's doing). It will use MATLAB to iterate on and validate the game code, making sure the tests pass. Once ready, it'll run the game for you. Or, you can start the game by running minihackContest.play in the command window.
That's it! You've created your first game with the help of an AI coding agent and MATLAB.
Once you're happy with your game, you can submit it to the contest by entering minihackContest.submit in the MATLAB Command Window.
Watch me do this on YouTube: https://youtu.be/0R_kYatC_Ag
Reply below and let me know if you found these instructions helpful and if you ran into any issues. Also, I'm interested to know which models you used. Thanks.
Chen Lin
Chen Lin
Última actividad alrededor de 11 horas hace

In our previous Mini Hack contests, you amazed us with creative images, animations, and videos. This year, we’re trying something new: Let’s make games!
With the help of Agentic AI, you don’t have to write all the code yourself. Bring your idea, and creativity, then work with AI to turn it into a MATLAB game.
New to Agentic AI? No problem!
We’ve created a step-by-step tutorial that can help you set up the MATLAB Agentic AI workflow in about 20 minutes, including a video to walk you through the process. This contest is about learning while having fun. We want you to experience the MATLAB Agentic AI workflow by actually using it to build something.
And don’t just create; share what you learn! Create a Tips & Tricks post to share your Agentic AI experience, discoveries, and useful tips with the community.
So get set up, start experimenting, have fun creating, and win big prizes! 🎁
🎮Ready? Go!!!✨✨✨
Ned Gulley
Ned Gulley
Última actividad el 28 de Oct. de 2026 a las 17:29

Week of October 26, 2026 524 responses

This quiz has ended. You can still submit an answer to see results.

Note: Answering past quizzes does not count toward your streak.

Inicie sesión para participar
Adam Danz
Adam Danz
Última actividad el 25 de Oct. de 2026 a las 17:16

Week of October 19, 2026 624 responses

This quiz has ended. You can still submit an answer to see results.

Note: Answering past quizzes does not count toward your streak.

Inicie sesión para participar
Ned Gulley
Ned Gulley
Última actividad el 14 de Oct. de 2026 a las 22:10

Week of October 12, 2026 140 responses

This quiz has ended. You can still submit an answer to see results.

Note: Answering past quizzes does not count toward your streak.

Inicie sesión para participar
Ned Gulley
Ned Gulley
Última actividad el 12 de Oct. de 2026 a las 22:06

Week of September 21, 2026 172 responses

This quiz has ended. You can still submit an answer to see results.

Note: Answering past quizzes does not count toward your streak.

Inicie sesión para participar
Mike Croucher
Mike Croucher
Última actividad el 7 de Oct. de 2026 a las 8:10

Week of September 28, 2026 224 responses

This quiz has ended. You can still submit an answer to see results.

Note: Answering past quizzes does not count toward your streak.

Inicie sesión para participar
Matt Tearle
Matt Tearle
Última actividad el 7 de Oct. de 2026 a las 1:11

Week of October 5, 2026 211 responses

This quiz has ended. You can still submit an answer to see results.

Note: Answering past quizzes does not count toward your streak.

Inicie sesión para participar
Chen Lin
Chen Lin
Última actividad el 16 de Sept. de 2026

The Cody Contest 2025 has officially wrapped up! Over the past 4 weeks, more than 700 players submitted over 20,000 solutions. In addition, participants shared 20+ high-quality Tips & Tricksarticles—resources that will benefit Cody users for years to come.
Now it’s time to announce the winners.
🎉 Week 4 winners:
Weekly Prizes for Contest Problem Group Finishers:
Weekly Prizes for Contest Problem Group Solvers:
Weekly Prizes for Tips & Tricks Articles:
This week’s prize goes to @WANG Zi-Xiang. See the comments from our judge and problem group author @Matt Tearle:
‘We had a lot of great tips for solving Cody problems in general and the contest problems specifically. But we all know there are those among us who, having solved the problem, still want to tinker and make their code better. There are different definitions of "better", but code size remains the base metric in Cody. Enter Wang Zi-Xiang who compiled a list of many tips for reducing Cody size. This post also generated some great discussion (even prompting our insane autocrat, Lord Ned himself, to chime in). I particularly like the way that, while reducing Cody size often requires some arcane tricks that would normally be considered bad coding practice, the intellectual activity of trying to "game the system" makes you consider different programming approaches, and sometimes leads you to learn corners of MATLAB that you didn't know.’
🏆 Grand Prizes for the Main Round
Team Relentless Coders:
1st Place: @Boldizsar
2nd Place: @Roberto
Team Creative Coders:
1st Place: @Mehdi Dehghan
2nd Place: @Vasilis Bellos
3rd Place: @Alaa
Team Cool Coders
1st Place: @Hong Son
2nd Place: @Norberto
3rd Place: @Maxi
Congratulations to all! Securing a top position on the leaderboard requires not only advanced MATLAB skills but also determination and consistency throughout the four-week contest. You will receive Amazon gift cards.
🥇 Winning Team
The competition was incredibly tight—we even had to use the tie-breaker rule.
Both Team Cool Coders and Team Relentless Coders achieved 16 contest group finishers. However, the last finisher on Cool Coders completed the problem group at 1:02 PM on Dec 7, while the last finisher on Relentless Coders finished at 9:47 PM the same day.
Such a close finish! Congratulations to Team Cool Coders, who have earned the Winning Team Finishers badge.
🎬 Bonus Round
Invitations have been sent to the 6 players who qualified for the Bonus Round. Stay tuned for updates—including the Big Watch Party afterward!
Congratulations again to all winners! We’ll be reaching out after the contest ends. It has been an exciting, rewarding, and knowledge-packed journey.
See you next year!
Missed the Cody World Cup Watch Party on March 27—or want to relive the glory?
The full recording is now available, and it’s every bit as entertaining as it was live.
What you’ll see in the video:
🔥 Top MATLAB users in action
Watch expert solvers think, debug, strategize—and occasionally panic.
Which functions do they reach for? How do they break down the problem?
BEHOLD the power moves… and the 3D arrays.
🏆 Three teams. Six champions. One viciously clever problem.
There may have been NaN traps.
There may have been nested for‑loops.
There may have been… emotions.
🎙️ Professional‑grade commentary by:
@Ned Gulley – Capricious dictator, Lord Ned
@Matt Tearle – Architect of Diabolical Challenges
Their line‑by‑line play‑by‑play turns MATLAB into a true spectator sport.
👉Watch the recording here and take a shot at the Champion-level problem yourself.
Finally, tell us what you want to see next—head‑to‑head contests? Team battles? Drop your ideas in the comments. All suggestions welcome!
This is a reminder that the Cody World Cup Watch Party takes place on March 27 at 10:00 AM ET.
We’ll watch how top MATLAB minds solve a fun‑but‑challenging Cody championship‑round problem, followed by a live open discussion with the players.
📅 To join, download the ics calendar file (link updated and no sign‑in required) or copy the meeting link and add it to your calendar!
📌 Full details, agenda, and prep suggestions are in the original announcement.
Chen Lin
Chen Lin
Última actividad el 19 de Mzo. de 2026

You’re invited to the Cody World Cup Watch Party! Six of the world’s best MATLAB users have advanced to the Cody Contest 2025 Bonus Round to tackle a championship-level Cody problem. Now it’s your chance to watch, learn, and interact with those pros!
📅When & How to Join
Date: March 27, 2026
Time: 10:00 AM Eastern Time
Where: Microsoft Teams (download the ics calendar file or copy the meeting link and add it to your calendar!)
📽 Agenda
Part 1 – Watch Together (25 min)
Watch how those top MATLAB users think, debug, strategize, and occasionally panic😅. Enjoy professional-grade commentary from MathWorks experts as the action unfolds.
Part 2 – Live Discussion (35 min)
Chat directly with those top minds and the problem creator, @Matt Tearle! Reply in the comments with questions you’d like us to ask them.
🧩 Solve the Problem Yourself!
For the best experience, try that Cody problem yourself before the event. Trust us — the discussions are way more fun after you’ve wrestled with it.
Whether you are a beginner or a seasoned expert, this is your chance to see the best in action, pick up MATLAB tips, and have some fun. See you there!
Chen Lin
Chen Lin
Última actividad el 4 de Dic. de 2025

Over the past three weeks, players have been having great fun solving problems, sharing knowledge, and connecting with each other. Did you know over 15,000 solutions have already been submitted?
This is the final week to solve Cody problems and climb the leaderboard in the main round. Remember: solving just one problem in the contest problem group gives you a chance to win MathWorks T-shirts or socks.
🎉 Week 3 Winners:
Weekly Prizes for Contest Problem Group Finishers:
Weekly Prizes for Contest Problem Group Solvers:
@森緒, @R, @Javier, @Shubham Shubham, @Jiawei Gong
Weekly Prizes for Tips & Tricks Articles:
This week’s prize goes to @Cephas. See the comments from our judge and problem group author @Matt Tearle:
'Some folks have posted deep dives into how to tackle specific problems in the contest set. But others have shared multiple smaller, generally useful tips. This week, I want to congratulate the cumulative contribution of Cool Coder Cephas, who has shared several of my favorite MATLAB techniques, including logical indexing, preallocation, modular arithmetic, and more. Cephas has also given some tips applying these MATLAB techniques to specific contest problems, such as using a convenient MATLAB function to vectorize the Leaderboard problem. Tip for Problem 61059 – Leaderboard for the Nedball World Cup:'
Congratulations to all Week 3 winners! Let’s carry this momentum into the final week!
Chen Lin
Chen Lin
Última actividad el 26 de Nov. de 2025

In just two weeks, the competition has become both intense and friendly as participants race to climb the team leaderboard, especially in Team Creative, where @Mehdi Dehghan currently leads with 1400+ points, followed by @Vasilis Bellos with 900+ points.
There’s still plenty of time to participate before the contest's main round ends on December 7. Solving just one problem in the contest problem group gives you a chance to win MathWorks T-shirts or socks. Completing the entire problem group not only boosts your odds but also helps your team win.
🎉 Week 2 Winners:
Weekly Prizes for Contest Problem Group Finishers:
Weekly Prizes for Contest Problem Group Solvers:
Weekly Prizes for Tips & Tricks Articles:
This week’s prize goes to @Athi for the highly detailed post Solving Systematically The Clueless - Lord Ned in the Game Room.
Comment from the judge:
Shortly after the problem set dropped, several folks recognized that the final problem, "Clueless", was a step above the rest in difficulty. So, not surprisingly, there were a few posts in the discussion boards related to how to tackle this problem. Athi, of the Cool Coders, really dug deep into how the rules and strategies could be turned into an algorithm. There's always more than one way to tackle any difficult programming problem, so it was nice to see some discussion in the comments on different ways you can structure the array that represents your knowledge of who has which cards.
Congratulations to all Week 2 winners! Let’s keep the momentum going!
In just one week, we have hit an amazing milestone: 500+ players registered and 5000+ solutions submitted! We’ve also seen fantastic Tips & Tricks articles rolling in, making this contest a true community learning experience.
And here’s the best part: you don’t need to be a top-ranked player to win. To encourage more casual and first-time players to jump in, we’re introducing new weekly prizes starting Week 2!
New Casual Player Prizes:
  • 5 extra MathWorks T-shirts or socks will be awarded every week.
  • All you need to qualify is to register and solve one problem in the Contest Problem Group.
Jump in, try a few problems, and don’t be shy to ask questions in your team’s channel. You might walk away with a prize!
Week 1 Winners:
Weekly Prizes for Contest Problem Group Finishers:
Weekly Prizes for Tips & Tricks Articles:
Week 1 winner for best Tips & Tricks Articles is @Vasilis Bellos.
Contest problems author @Matt Tearle commented:
We had a lot of people share useful tips (including some personal favorite MATLAB tricks). But Vasilis Bellos went *deep* into the Bridges of Nedsburg problem. Fittingly for a Creative Coder, his post was innovative and entertaining, while also cleverly sneaking in some hints on a neat solution method that wasn't advertised in the problem description.
Congratulations to all Week 1 winners! Prizes will be awarded after the contest ends. Let’s keep the momentum going!
Chen Lin
Chen Lin
Última actividad el 11 de Nov. de 2025

What a fantastic start to Cody Contest 2025! In just 2 days, over 300 players joined the fun, and we already have our first contest group finishers. A big shoutout to the first finisher from each team:
  • Team Creative Coders: @Mehdi Dehghan
  • Team Cool Coders: @Pawel
  • Team Relentless Coders: @David Hill
  • 🏆 First finisher overall: Mehdi Dehghan
Other group finishers: @Bin Jiang (Relentless), @Mazhar (Creative), @Vasilis Bellos (Creative), @Stefan Abendroth (Creative), @Armando Longobardi (Cool), @Cephas (Cool)
Kudos to all group finishers! 🎉
Reminder to finishers: The goal of Cody Contest is learning together. Share hints (not full solutions) to help your teammates complete the problem group. The winning team will be the one with the most group finishers — teamwork matters!
To all players: Don’t be shy about asking for help! When you do, show your work — include your code, error messages, and any details needed for others to reproduce your results.
Keep solving, keep sharing, and most importantly — have fun!
The main round of Cody Contest 2025 kicks off today! Whether you’re a beginner or a seasoned solver, now’s your time to shine.
Here’s how to join the fun:
  • Pick your team — choose one that matches your coding personality.
  • Solve Cody problems — gain points and climb the leaderboard.
  • Finish the Contest Problem Group — help your team win and unlock chances for weekly prizes by finishing the Cody Contest 2025 problem group.
  • Share Tips & Tricks — post your insights to win a coveted MathWorks Yeti Bottle.
  • Bonus Round — 2 players from each team will be invited to a fun live code-along event!
  • Watch Party – join the big watch event to see how top players tackle Cody problems
Contest Timeline:
  • Main Round: Nov 10 – Dec 7, 2025
  • Bonus Round: Dec 8 – Dec 19, 2025
Big prizes await — MathWorks swag, Amazon gift cards, and shiny virtual badges!
We look forward to seeing you in the contest — learn, compete, and have fun!
Chen Lin
Chen Lin
Última actividad el 15 de Nov. de 2024

We are thrilled to announce the grand prize winners of our MATLAB Shorts Mini Hack contest! This year, we invited the MATLAB Graphics and Charting team, the authors of the MATLAB functions used in every entry, to be our judges. After careful consideration, they have selected the top three winners:
1st place - Tim
Judge comments: Realism & detailed comments; wowed us with Manta Ray
2nd place – Jenny Bosten
Judge comments: Topical hacks : Auroras & Wind turbine; beautiful landscapes & nightscapes
3rd place - Vasilis Bellos
Judge comments: Nice algorithms & extra comments; can’t go wrong with Pumpkins
There is also an Honorable Mention - William Dean
Judge comments: Impressive spring & cubes!
In addition, after validating the votes, we are pleased to announce the top 10 participants on the leaderboard:
Congratulations to all! Your creativity and skills have inspired many of us to explore and learn new skills, and make this contest a big success!
Chen Lin
Chen Lin
Última actividad el 7 de Nov. de 2024

Over the past 4 weeks, 250+ creative short movies have been crafted. We had a lot of fun and, more importantly, learned new skills from each other! Now it’s time to announce week 4 winners.
Nature:
3D:
Seamless loop:
Holiday:
Fractal:
Congratulations! Each of you won your choice of a T-shirt, a hat, or a coffee mug. We will contact you after the contest ends.
Weekly Special Prizes
Thank you for sharing your tips & tricks with the community. These great technical articles will benefit community users for many years. You won a limited-edition pair of MATLAB Shorts!
In week 5, let’s take a moment to sit back, explore all of the interesting entries, and cast your votes. Reflect what you have learned or which entries you like most. Share anything in our Discussions area! There is still time to win our limited-edition MATLAB Shorts.

Acerca de Meta Contests

The MathWorks community has been enjoying programming contests since 1998!

Discuss, share your experiences, and celebrate your wins in the MATLAB Community contests.

Recent Contests


FEATURED

A masterpiece. I admire the combination of mathematic understanding, implementation skills, and aesthetics.

Contribuyentes destacados

Moderadores