# Simplest pattern recognition

This topic is 4074 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm not sure if this should be in general programming. I have N (3~6) spheres in 3D space connected by lines. Each line has a strength assigned (1-4). The shorter the distance, the bigger the strength. I need a process that recognizes shapes. For example: - A triangle where all sides are connections of the same strength. - A rhombus where all sides are connections of the same strength as the shortest of the central connections. - A regular pentagon (the weak connections inside would form a pentagram). Could (and should) I solve this with an AI or I should move the thread to general programming. Thanks.

##### Share on other sites
Since your classes are so well defined, I would use a simple classification tree, using such parameters as the number of connections, the connection strengh span, etc.

##### Share on other sites
Aye, I'd agree that a decision/classification tree would be a good way to go with this. You've got a very constrained number of vertices (spheres) and a dependent number of edges (lines) and a small enumeration of the possible shapes (leaf nodes in the tree).

##### Share on other sites
You were right.

The items are left free in a 3D space and they build the shapes following an attraction/repulsion function.

Five items can form:
A- a 'C'.
B- a square with an item in the center.
C- a 'W'.
D- a pentagon.
E- a bird foot.

Listing the "hard connections" (the ones that form between closest items)

1) 1, 1, 2, 2, 2
2) 2, 2, 2, 2, 4
3) 2, 2, 3, 3, 4
4) 2, 2, 2, 2, 2
5) 1, 2, 2, 3, 4

I'll just have to do this for groups of 4, 5 and 6.

Thanks for pointing in the right direction, I was about to follow a much longer path. :)

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631782
• Total Posts
3002324
×