Competition Format

JRMPC 2023 will be using a modern derivative of Smalltalk called Pharo.

The competition is based on a popular family game called Qwirkle. Here are a couple of videos to explain the rules of the game:

You will be programming to a server API and playing against a robot. The program that racks up the highest score wins. Here is the location of the API document.

Code snippets have been made available to help you get started. These snippets can be executed in the Playground to help you understand how to use the API.

Tips

#1. You can use the inspect operator to examine the contents of a game object. For example:

"I'm already a player, get me"
url := 'qwirkle/games' asZnUrl / (game at: '_id') / 'me'.
data := client get: url.
me := STON fromString: data.
me inspect.

#2. You can convert a board bitmap into a morph for easier visualization. For example:

"get the board bitmap"
url := 'qwirkle/games' asZnUrl / (game at: '_id') / 'bitmap'.
data := client accept: 'application/octet-stream'; get: url.
client accept: 'text/json'.
png := PNGReadWriter formFromStream: data readStream.
png asMorph openInWorld.

Doing this will open a window containing the morph. However, if you don’t close the window, you will accumulate windows on your screen as you repeatedly execute your code. To clean up these windows, use Alt-Shift left-click with your mouse on each window to bring up a halo menu and click the close icon.

#3. You can use Ctrl-Shift R or L to indent/outdent blocks of code in the editor.

Deadline

From the close of registration on November 1, 2022 to the competition date of February 4, 2023, you will develop your (hopefully winning) program. On February 4, your submission will be executed and your result tallied. The highest scores win.


I’d like to give a shout out to the team at FAST who developed the server software and server API document:

  1. Leandro Caniglia (President of FAST)
  2. Valeria Murgia
  3. Carlos E. Ferro
  4. Annita Caniglia
  5. Agustín Caniglia

Many thanks!

FAST (Fundación Argentina de Smalltalk) is a non-profit foundation that seeks to promote the use of the Smalltalk programming language and technology. As such, it organizes annual activities that engage international specialists from academia, government, and the software industry.