# Wanting to implement an AI solution to this

• ### Question

• The problem I'm trying to solve is this:

1) The user is presented with a left side list of 'things' and a right side list of 'things'.

2) A thing is a transaction (has amounts, dates, and other variables).

3) Visually, the user can use their own intelligence and knowledge to match up one or more items on the left to one or more items on the right.

4) I want the program to learn and predict which items on the left and which items on the right would be matched by the user if they did it themselves.

A simple example:

• The left side has 5 rows in the list. The amount (value) of each of the 5 rows is 1, 3, 5, 8, 25
• The right side has 3 rows in the list. The Amount (value) of each of the 3 rows is 4, 5, 6, 44

The user does the math in their head and decides that 3 + 5 + 8 = 16 on the left and 4 + 5 + 6 = 15 on the right. The difference is <= 1. If it is early in the month, that amount isn't close enough... but at the end of the month it is.

So early in the month, the AI says 'No Match' but at the end of the month then 16 is close enough to 15 and the program would color 'green' the respective rows on both sides.

I would want to program this so that the various parameters are 'known' to the app so it sets this as the starting scenario. The user manually selects both sides and clicks a button - and the machine 'learns' what the user would do based on which rows are selected when they hit the button.

From the start, the machine makes a prediction and colors the rows as suggested matches. If the user accepts the prediction, then the AI is reinforced. If the user selects another combination, then the AI should be able to choose the right results next time.

How in the heck do I start and are their libraries I can incorporate into the app that lets me define all the variables (i.e. the amounts on all rows right and left and whether or not it is the beginning or the end of the month... and predicts the user's choice?

Saturday, August 3, 2019 2:50 PM

### All replies

• Well, it's easy enough to sum up all of the combinations of your two lists, and compare the sums to see which ones might be close enough, but you[re going to end up with many potential matches.

For example, in the example you posted, the set (1,3,5,8,25) has 27 different sums:

1, 3, 4, 5, 6, 8, 9, 11, 12, 13, 14, 16, 17, 25, 26, 28, 29, 30, 31, 33, 34, 36, 37, 38, 39, 41, 42

and the set (4,5,6,44) has 15 different sums:

4, 5, 6, 9, 10, 11, 15, 44, 48, 49, 50, 53, 54, 55, 59

There are some exact matches and some close matches.  So, which combinations are going to interest you?  Is there a minimum number of entries that has to be combined?

Tim Roberts | Driver MVP Emeritus | Providenza &amp; Boekelheide, Inc.

Monday, August 5, 2019 5:47 AM
• Hi

Thank you for posting here.

Since this thread is related AI, we don't support it. please post it in the correct forum.

The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.

Best Regards,

Jack

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

Wednesday, August 21, 2019 8:01 AM