7 Replies - 565 Views - Last Post: 07 December 2017 - 08:41 AM

#1 bobsmith76   User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 220
  • Joined: 14-February 17

Has this algorithm been written yet?

Posted 05 December 2017 - 06:00 AM

Posted Image


What I need to do in the above is I need to loop through the lists. Think of the numbers as hypotheses. If the list has only one member then you just go to the next list. If the list has several members then you just assume the first member is what works. No number can appear in two lists. As you loop through the list each time you will test whether the hypothesis works. If your hypothesis fails then you need go back to the first point in which the tree diverges and choose a new member. Ultimately, only one number will fit in each slot.
I prefer a pythonic solution but maybe this puzzle has a name and it has been dealt with in other languages.

I'm pretty sure that the tree will be too big to calculate with so I am already working on another way to trim the tree down. I have other variables in the algorithm which might help.


Plus is there a better way to post images? Or is it because I only have 53 posts and cannot be trusted to post images.

This post has been edited by modi123_1: 05 December 2017 - 06:29 AM
Reason for edit:: Added img tags.


Is This A Good Question/Topic? 0
  • +

Replies To: Has this algorithm been written yet?

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14174
  • View blog
  • Posts: 56,774
  • Joined: 12-June 08

Re: Has this algorithm been written yet?

Posted 05 December 2017 - 06:33 AM

Is this 'forward chaining' as in you are making an 'inference engine'?
https://en.wikipedia...orward_chaining
https://en.wikipedia...nference_engine

No.. use imgur to host your image and use the image tag to display it.
Was This Post Helpful? 0
  • +
  • -

#3 bobsmith76   User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 220
  • Joined: 14-February 17

Re: Has this algorithm been written yet?

Posted 05 December 2017 - 06:36 AM

Actually, it might be the case that there are 16 billion possibilities and only one right one, so I am certainly going to look for a different solution. I think I already have one.

View Postbobsmith76, on 05 December 2017 - 06:34 AM, said:

Actually, it might be the case that there are 16 billion possibilities and only one right one, so I am certainly going to look for a different solution. I think I already have one.


It is an inference engine but I don't thinks it's forward chaining. I'm very tired right now so I'll go into more details tomorrow.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14174
  • View blog
  • Posts: 56,774
  • Joined: 12-June 08

Re: Has this algorithm been written yet?

Posted 05 December 2017 - 06:39 AM

There's always backwards chaining.
https://en.wikipedia...ckward_chaining
Was This Post Helpful? 0
  • +
  • -

#5 bobsmith76   User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 220
  • Joined: 14-February 17

Re: Has this algorithm been written yet?

Posted 05 December 2017 - 06:45 AM

View Postmodi123_1, on 05 December 2017 - 06:39 AM, said:

There's always backwards chaining.
https://en.wikipedia...ckward_chaining



Actually, I'm going to try a completely different solution. It's about matching sentences and I already have the sentences numbered in a heirarchy.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14174
  • View blog
  • Posts: 56,774
  • Joined: 12-June 08

Re: Has this algorithm been written yet?

Posted 05 December 2017 - 06:46 AM

Matching sentences? Seems odd when most folk look at the parts that make up a sentence to get the idea of the whole.

So it goes.. it's your project... there's also LISP to use for fuzzy logic. I remember that helping out some.

I have to say this has a large leibniz76 vibe to it.
Was This Post Helpful? 0
  • +
  • -

#7 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6290
  • View blog
  • Posts: 21,618
  • Joined: 05-May 12

Re: Has this algorithm been written yet?

Posted 06 December 2017 - 04:35 PM

In the OP, there is mention of a "tree". Perhaps it's just because it's been a long day, or maybe I am just dense, but I'm not seeing how a tree is constructed with that data.
Was This Post Helpful? 0
  • +
  • -

#8 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12324
  • View blog
  • Posts: 45,424
  • Joined: 27-December 08

Re: Has this algorithm been written yet?

Posted 07 December 2017 - 08:41 AM

At first glance, the image in the OP looks like an adjacency list representation of a graph. Since this project is about language recognition, are you describing a context-free grammar of some sort?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1