Jump to content

Recommended Posts

Posted

wtf is with gmail these days , what is it?

My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]
  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

ok so i have it configured to give me the conditional statement and its converse...

$p = InputBox("Hypothesis", "Type in the hypothesis in the space provided.", "")
$q = InputBox("Conclusion", "Type in the conclusion in the space provided.", "")
MsgBox(0, "Conditional Statement", "If " & $p & ", then " & $q)
MsgBox(0, "Converse Statement", "If " & $q & ", then " &$p)
...now all i need help with is making my own function to reverse $p and $q...yes ive rtm and search all the topics but i still cant figure out how to make it recognize ~$p and ~$q ...

Guest BL@(K-R34P3R
Posted

What do you mean by reverse? Like switch the positions? I forgot about converses and stuff, so if you could refresh my memory =)

Posted (edited)

ok ...

Conditional Statement = If xxx, then yyy.

Converse = If yyy, then xxx.

Inverse = If (opposite of xxx), then (opposite of yyy). <---THIS IS WHAT I WAS TALKING ABOUT

Contrapositive = If (opposite of yyy), then (opposite of xxx).

and if possible...i want it to decide if the cond. and/or the conv. are false and then make a counterexample...

Counterexample = an example that would prove $q wrong.

Edited by ifthenhelpme
  • Developers
Posted

ok...so ive compiled the script...download it and try it out...maybe someone can help me

<{POST_SNAPBACK}>

could you show an example what you input and want to see as the result ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

ok...

For Hypothesis i type -> "the sun is out"

For Conclusion i type -> "it is sunny"

Conditional Statement -> "If the sun is out, then it is sunny"

Converse Statement -> "if it is sunny, then the sun is out"

Guest BL@(K-R34P3R
Posted

It is impossible to make an Inverse, and Contrapositive. This is because, AutoIt doesn't have a built in "opposite function", you can't call the opposite of a variable. I mean, I suppose you could do it, but either

A)It would take a lot of scrpiting, (making a return for each input possible)

or

B)Return a "-" in front of the variable...

Guest BL@(K-R34P3R
Posted

Well, to do that would require more work then it would be worth. You would have to program it to respond to every possible sentence, (as far as I know) and then to respond in MsgBox form to each of those with an opposite response =/

Posted

i dont understand how u are going to use this for math, can u give an example for what you would use?

My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]
Guest BL@(K-R34P3R
Posted

It's in geometry. There is a section on conditional statements. The contrapositive, inverse, and such. It will give you a question like "Find the contrapositive of 'The boy walked to school.'" Then you need to write the contrapositive of that statement.

Posted

yea...can u help me?

EDIT: If someone can help me through this I will send then atleast 2 free GMail invites...if that matters to anyone...

<{POST_SNAPBACK}>

I can try to help you.... but it already took 5 mins to understand your Problem..., ill give my verybest ^^ :ph34r:
Posted (edited)

$p = InputBox("Hypothesis", "Type in the hypothesis in the space provided.", "the sun is out")
$q = InputBox("Conclusion", "Type in the conclusion in the space provided.", "it is sunny")
MsgBox(0, "Conditional Statement", "If " & $p & ", then " & $q)
MsgBox(0, "Converse Statement", "If " & $q & ", then " &$p)

$contrap = StringSplit($p, " ")
$p = ""
for $i = 1 to $contrap[0]
    if($contrap[$i] = "is") Then $contrap[$i] = "isn't"
Next
for $i = 1 to $contrap[0]
    $p = $p & $contrap[$i]&" "
Next
$contraq = StringSplit($q, " ")
$q = ""
for $i = 1 to $contraq[0]
    if($contraq[$i] = "is") Then $contraq[$i] = "isn't"
Next
for $i = 1 to $contraq[0]
    $q = $q & $contraq[$i]&" "
Next
MsgBox(0, "Inverse Statement", "If " & $p & ", then " &$q)
MsgBox(0, "Contrapositive Statement", "If " & $q & ", then " &$p)

I have no idea if this is what u are searching for, but not it works as u described it .... but it just changes "is" to "isn't"

Edit: Now i really got what u meant by

Well, to do that would require more work then it would be worth. You would have to program it to respond to every possible sentence, (as far as I know) and then to respond in MsgBox form to each of those with an opposite response =/

but u don't really need a list for every possible sentence... it is much easier to create an array with any number of statements and verbs.

Like $a = "is, have, can, goes, ...."

and then another array with the contra of this statement

$b = "isn't, havenn't, can't, doesn't go, ....."

and if there is one of this words in the statement it just replaces it.

This program wouldn't be perfect, but if the list is big, it should transfrom the most sentences

(sorry for my terrible grammar, but i'm not from the US...)

Edited by Konan--M
Guest Guidosoft
Posted

Is it posible to make an artificialy intellegent script that understands language. I wan't to make one that you type in a question or you tell it to do something and it lookups the answer or carries out your command.

Can it be done? Is it simple? Do you think I can write one?

Posted

Is it posible to make an artificialy intellegent script that understands language. I wan't to make one that you type in a question or you tell it to do something and it lookups the answer or carries out your command.

Can it be done? Is it simple? Do you think I can write one?

<{POST_SNAPBACK}>

That would be to funny --- if you can write a script that can do this - ur gettin the oscar and millions of dollars .... cause you invented the first AI in the world :lol::D:D:D:D:D :ph34r::(:lol:

Back to the script try this one :

$a = "is|have got|can|goes|writing|getting"
$b = "isn't|haven't got|can't|doesn't go|not writing|not getting"

$arraya = StringSplit($a, "|")
$arrayb = StringSplit($b, "|")

$p = InputBox("Hypothesis", "Type in the hypothesis in the space provided.", "this script is working")
$q = InputBox("Conclusion", "Type in the conclusion in the space provided.", "I am getting a new gmail account")
MsgBox(0, "Conditional Statement", "If " & $p & ", then " & $q)
MsgBox(0, "Converse Statement", "If " & $q & ", then " &$p)

$contrap = StringSplit($p, " ")
$p = ""
for $i = 1 to $contrap[0]
    for $j = 1 to $arraya[0]
     if $contrap[$i] = $arraya[$j] Then $contrap[$i] = $arrayb[$j]
    Next
Next
for $i = 1 to $contrap[0]
    $p = $p & $contrap[$i]&" "
Next
$contraq = StringSplit($q, " ")
$q = ""
for $i = 1 to $contraq[0]
    for $j = 1 to $arraya[0]
     if $contraq[$i] = $arraya[$j] Then $contraq[$i] = $arrayb[$j]
    Next
Next
for $i = 1 to $contraq[0]
    $q = $q & $contraq[$i]&" "
Next
MsgBox(0, "Inverse Statement", "If " & $p & ", then " &$q)
MsgBox(0, "Contrapositive Statement", "If " & $q & ", then " &$p)

Just add more statements to the arrays and it should work :D

Posted

ok sorry but what i really meant was that this would be not possible with autoit, or maybe too complicated.

I think a whole team of programmers worked on that for - *long time* -

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...