Two points P1(b1,c1),P2(b2,c2).
.if min(d1,d2) <= 10 then d=max(d1,d2)*10+min(d1,d2) . else d=max(d1,d2)*100+min(d1,d2) .end-if
. p(12,15),q(3,16) d1=abs(12-3)=9 d2=abs(15-16)=1
. m(19,1),n(2,19) d1=abs(19-2)=17 d2=abs(1-19)=18
. This distance may be used to manage patterns like x,y.
Dieter: I don't know where this metric comes from but I have a few comments
- max(d1,d2)*min(d1,d2) can be simplified to d1*d2
- this distance is rather generous for points on the same line; one line further and the distance already doubles; a diagonal point is as remote as a 3 point jump
- technically, it is not a distance metric, as it doesn't satisfy the identity axiom (I was worried about the triangular inequality but that seems fine) and you should subtract 1 to get there
ruf012: Many Thanks
where this metric comes from
. d is only a simple distance of two points. No metric axioms.
. I work with d, to manage patterns, here it is arised.
. example. corner.opening .
. All ,,, answers in one directory d22.
. All ,,, in directory d21.
. Probably other persons did the same.
can be simplified
. Indeed, if min in 0..9 this would be sufficient.
. But, if min in 10..19 a multiplication with 100 would be necessary
. To simplify the text, I made one string.
the distance already doubles
. Points 33,44 and 44,55 with the same d, what else.
it is not a distance metric
. Correct, just a simple distance.
you should subtract 1
. Additions with 1.
. It is easier to count from one stone to the other one on the board.
. x,y Eye goes 4 lines upwards and 2 lines sideways.
. d1=abs(b1-b2)+1 d2=abs(c1-c2)+1
. replaced by
. d1=abs(b1-b2) d2=abs(c1-c2)
Dieter: OK now I'm totally lost :) I'm sure you're onto something but I can't see it. Good luck!