Skip to content
Eduardo Narros edited this page Apr 17, 2021 · 4 revisions

Code quality

UI

Java Swing

  • Use worker threads to avoid locking the UI.

Board

Balancing readability and performance

Use immutable structures as much as possible but avoid making unnecessary copies of objects.

Optimised for accessing the current value of a square means using a stateful board backed by an array. If we use a board backed by "moves" (event sourced), it would be too slow to access the current state of a square.

Gameplay

Generation

Given a particular board, what are the possible moves?

Undo

Stateful vs stateless considerations, it seems that if the board is immutable, the game becomes much slower.

Could using an immutable board and multithreading algorithms significantly change how many moves can be processed?

Artificial Intelligence

Given a particular board and the possible moves, which move should be selected?

alpha-beta algorithm