-
Notifications
You must be signed in to change notification settings - Fork 0
Pairwise Compatibility Based Puzzle Solving
What is precisely a piece? It is difficult to say. It could be an image, a polygon, a point cloud, etc. and it could be enriched with some features, like segmentation masks, bounding boxes, colours, hyper-spectral information etc.
To formalize mathematically all these possibilities would be very time consuming. We will just say that we have a set universal set
In practice, pieces are given as an object with basic features (image or point cloud for example) and then more advances features are extracted after. Moreover, if some form of statical learning is used, some of these features could be implicitly extracted during the training process.
Sometime it can be necessary to distinguish between pieces
An object in the plane can described by the position
We want to account for the periodicity of the angle. Thus we describe each object by an element of
To implement this effectively we could store a unitary complex number
If we implement this simply as a number we should manually keep track of the periodicity.
A pair of objects in the plane is described by an element of
A translation
and rotations
Let
In puzzle solving one is mainly interested in relative configurations between objects. More precisely, we want pairs of absolute configurations to be equivalent if they differ by rotations or translations. Thus the set of relative configurations can be seen as the orbit group of
There is a bijection
In more layman terms, this means that we can describe relative configurations by fixing the first object in the origin, not rotated, and by giving the absolute configuration of the second object. From now on we will simply adopt this convention and we identify
Given a pair of absolute configurations
Remark. If
by exchanging the roles of object
Notice that
In summary, a relative configuration is a pair
Intuitively speaking, a solution to a puzzle
As was done for the relative configuration of pairs of pieces, even in this case we can select an anchor and express a solution with respect to it. Let
There are other ways to describe a solution, but they should be equivalent to this one. For example a solution could be given as a list of
A configuration scoring (or score) function (CSF) is a mapping $$\phi: Q_{rel} \to \mathbb{R}$$that to each configuration assigns a score. The set of scoring functions is denoted by
A (pairwise) compatibility function (PCF) is a function that takes in input two pieces and gives a configuration score function
or, equivalently, this can be seen a real valued function on concrete relative configurations:
We set
We must have
for pieces
Given natural number
Let
We will often abuse the notation and denote this simply by
This kind of compatibility allows for pieces to be compatible even if they are not touching. This could be helpful when we exploit certain features that can have an "action at a distance". Example line continuation... In many cases, however, we require the pieces to touch.
On the other hand, in most cases we do not want pieces to overlap/compenetrate, thus