Sign in to follow this  
Zanshibumi

Simplest pattern recognition

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this