My syllogism program

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

Recommended Posts

My syllogism program is made in the c programming language. Normally syllogisms require twos sentences, but my program requires only one sentence.
It then creates the minor premise and the conclusion of the syllogism.

The program is built so that if the first answer it makes is wrong, you mark it zero and then try the syllogism again and it then gives you a different answer. You do this until your happy with the answer then you mark it one.

I made this program for my artificial intelligence project, but i don't know what to do next. So I'm hoping by posting this you can try the program out and give me some ideas of what to do next with my program.

Here are some examples of the program running:

 Type 1 to run the program 1 Enter a sentence, all lower case. Rename X and Y with words, the new word must have both a letter and vowel in it. Formats of sentences: A.)X are Y B.)some X is Y C.)some X are not Y some dog is here __________________________________________ Type Celarent (EAE-1) or Celaront (EAE-1) Syllogism pattern No M is P S are M Celarent some dog is here. bloodhound are dog. some bloodhound is here Celaront some dog is here. bloodhound are dog. Some bloodhound are not here Felapton some dog is here. bloodhound are dog. Some dog are not here __________________________________________ Was the syllogism logical? 1 for yes, 0 for no: 1 Close program? 1 for yes, 0 for no: 0 Enter a sentence, all lower case. Rename X and Y with words, the new word must have both a letter and vowel in it. Formats of sentences: A.)X are Y B.)some X is Y C.)some X are not Y some bad is here __________________________________________ Type Celarent (EAE-1) or Celaront (EAE-1) Syllogism pattern No M is P S are M Celarent some bad is here. backstabber are bad. some backstabber is here Celaront some bad is here. backstabber are bad. Some backstabber are not here Felapton some bad is here. backstabber are bad. Some bad are not here __________________________________________ Was the syllogism logical? 1 for yes, 0 for no: 1 Close program? 1 for yes, 0 for no: 1 Press any key to continue . . . 

I have updated this post and the attached file. To open it, remove the txt extension and unzip it.

Share on other sites
Hidden
I thought this up while I was waiting for a reply. Basically it creates a case to use the word list in the sentence generator.

___________________
The template begin:
___________________
defining the variable verb = am , are , is , are , was , were , was , were , being , been.
_________________________________
The input sentence from the user:
_________________________________

Define the pronoun) 'pronoun' 'noun (m)' 'verb' 'noun complement (p)'

_____________________________________
The results generated by the program:
_____________________________________

question A) (who, what, where, when, why) 'verb' 'pronoun' 'noun (m)'
question B) (who, what, where, when, why) 'verb' 'noun complement (p)'

redefine pronoun A) 'pronoun' 'noun (m)' 'verb' 'noun complement (p)'
redefine pronoun B) 'noun complement (p)' 'verb' 'pronoun' 'noun (m)'

______________
/template end.
______________

example A of template being used:

Define pronoun) my name is Jeremy
question A) What is my name
redefine pronoun A) your name is Jeremy

example B of template being used:

Define pronoun) my name is Jeremy
question B) What is Jeremy
redefine pronoun B) Jeremy is your name.

_________________________
The program section begin
_________________________

The input provides the M and P.

The Program then fills in the templates below using the M and P from the user:

"What is my M"

"What is P"

What does M mean?

(Then I run the sentence generator and it pulls up some result from the word list which defines name.
Then I display the sentence that defines name. S is the word from the word list)
M is S
M are S
_________________________
/the Program section end.
_________________________

I think this site is for developing game AI only. And game AI is only supposed to lose convincingly according to somebodies Sig I read in one of the threads here.
So if this is the case then please delete this thread and close my account.

Hidden
That result with the word acidic is marked zero, then when the input is given the result is different, it’s accomplished I think. yeah, it’s changed from the word ‘acidic’ to ‘accomplished’.

Then every time you enter that sentence it return the word accomplished in it’s syllogism sentences.

So a syllogism has a main premise and a minor premise and three variables, A B C.
The main premise uses two of the variables and the minor premise uses two of the variables, and the one variable is used in both the main and minor premise.

That is what I have as my syllogism results.
The terms camestros etc come from the Wikipedia site that defines syllogism types.
it’s there that I got the syllogism formula printed above the syllogism sentences.

The point is that from one sentence the user inputs you get the entire syllogism, and it’s not based on user defining the minor premise, the program uses a word list and code to define the minor premise and if the syllogism makes sense then the program made the minor premise properly and you mark the result as one.

Hidden
I have updated the first post. The source is newer and this removed a bug where there might not be a answer given in some circumstances. And the output is neater.

So I have re-uploaded the source in the first post, now the output makes more sense.

Share on other sites
Your syllogisms are all incorrect . I suggest you read this: http://en.wikipedia.org/wiki/Syllogism

For example:
some dog is here. bloodhound are dog. some bloodhound is here

You can't conclude that a bloodhound is here, since not all dogs are bloodhounds.

Share on other sites
In the Wikipedia site on the Venn Diagram for Celarent, Celaront, Felapton, it is "No M is P".
After being told here: My link that
"No, it is still wrong: no dog is here.
bloodhound are dog.
Some bloodhound are not here

If bloodhounds are dogs then ALL bloodhounds are not here."

"Ok, let’s assume there is a room in which no dogs are in it. A bloodhound is a dog, so there are NO bloodhounds in the room. I wouldn’t believe all you read on Wikipedia."

So I changed the wording from No to Some. Since Some dogs are Bloodhounds. It would be worse if I said "No dog is here. Bloodhounds are dog. Some Bloodhound is here".

So I don't know which way to go on this honestly, and I wonder if one of you is wrong.

Share on other sites
What is this program supposed to do? Insert random words into logical templates until you tell it that the random words is associated with your input word?

And yes, your templates seem faulty, imagine this conversation:
A) Some of my friends are here.
B) Are you friends with Jeremy?
A) Yes.
B) So Jeremy is there!
A) Uh, no. Jeremy is my friend, but he's not here. Other friends are here.

Share on other sites
That would actually go like this:

 some friend is here jeremy are friend some jeremy is here some friend is here jeremy are friend some jeremy are not here some friend is here jeremy are friend some friend are not here 

What is supposed to happen is the S in the syllogism is made into a word from a word list. S in my examples I just posted is the noun 'jeremy' in the second sentence.

The second and third sentences are made by the program by only using the first sentence. So if you get a logical answer then the code made two thoughts/sentences properly, showing it understood the input enough to create two sentences.

And it's not my logic, I just used the Venn diagrams over at Wikipedia that the other person linked too. So I can't say the logic is totally true all the time. My goal is since words change the proper usage of the syllogism I am happy that only one syllogism is correct out of the three each time the program is run.

And this is the program result for "some friend is here" in the program:

 some friend is here __________________________________________ Type Celarent (EAE-1) or Celaront (EAE-1) Syllogism pattern No M is P S are M Celarent some friend is here. avowed are friend. some avowed is here Celaront some friend is here. avowed are friend. Some avowed are not here Felapton some friend is here. avowed are friend. Some friend are not here __________________________________________ Was the syllogism logical? 1 for yes, 0 for no: 1 Close program? 1 for yes, 0 for no: 1 Press any key to continue . . . 

Share on other sites
As Mussi said, these are simply not syllogisms - you have not at all copied the logic from wikipedia. If you had copied the logic correctly, you would have two premises followed by a true conclusion. The point of a syllogism is that given two premises, you can make a logical conclusion about them - you are not making logical conclusions from your premises.
some friend is here
jeremy are friend
some jeremy is here
That conclusion cannot be deduced from the two premises. You can only conclude that jeremy may or may not be here.
some friend is here
jeremy are friend
some jeremy are not here[/quote]Again, that conclusion is false. It does not follow from the two premises.
some friend is here
jeremy are friend
some friend are not here[/quote]This conclusion doesn't even require the second premise, the 2nd premise is simply ignored!
some friend is here.
avowed are friend.
some avowed is here[/quote]No, this would be logical if the minor premise was "all friend are avowed".
some friend is here.
avowed are friend.
Some avowed are not here[/quote]The second premise doesn't contain "all"/"some"/"no", making it ambiguous... however, even if it did contain one of those 3 prefixes, the conclusion would still be illogical.
some friend is here.
avowed are friend.
Some friend are not here[/quote]Again, no "all"/"some"/"none", plus the conclusion doesn't even involve the 2nd premise anyway!

• 10
• 17
• 9
• 13
• 41