Good vs. Evil

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
88 Eh, you're probably OK. I mean, humans are pretty good at stringing sentences together, and the structure of your sentences is fairly simple- pick an adjective from a list of colors, a noun from a list of animals, a verb or two, recur once or twice... and boom, a sentence.
 
89 in that case maybe I should let lua do it.
create an array (or in lua terms a table) for colors, creatures choose a random few and chain them together.

probably isn't that hard,right?
 
90 Not terribly... Hofstadter has a pretty good high-level description of how his program works, but I don't have a copy of the book handy, and I don't remember all the details off the top of my head, so...

One of the things he did was set up all the different ways to create a phrase that acts like a noun. His FancyNoun function could return one of the following, chosen at random:
  1. Just a noun
  2. #1, preceded by a random number of adjectives
  3. A FancyNoun + something like "that" + a verb
  4. #3 + a preposition + another FancyNoun
  5. Any of the above, preceded by an article (a, an, or the)
  6. A few other things that I forgot
He had a pretty nice flowcart showing all the different combinations of things... if this topic comes up again next time I'm home (in a few weeks), I'll be able to post a few pictures. If they're not available on the Internet... hmm...
 
92 As an example, I'll use a random number generator to help me walk through the above algorithm, and see what happens. I'm using indents to keep track of recursive calls to the different options. "Choose" means that the algorithm executed FancyNoun, requiring me to choose an option at random; "do" means the algorithm said to perform a specific option.

Choose #4
Do #3
Choose #2
Two adjectives: "blue" "green"
Do #1
Noun: "cat"​
"that" (dunno what specific part of speech "that" is)
Verb: "walk"​
Preposition: "between"
Choose #1
Noun: "platypus"​

End result: "blue green cat that walk between platypus"

Version 1 of Hofstadter's program spat out stuff like the above (with an extra verb and maybe an object attached to make it a sentence); Version 2 added in rules about making nouns plural (so "platypus" would become "platypi") and conjugating verbs (turning "walk" into "walks"), as well as a bunch more words.

I might have to try to put something like this together in Clojure. Hmm...
 
93 so, lua vs Clojure.
I think that Clojure is going to win partially because I don't have much time to work on it.

also that moment when you think you are typing work but it ends up being rok :confused:
 
  • Like
Reactions: xTordX
51 my black keyboard betrayed me. That being said I need to look for new keys for my keyboard at home or something like that. They are dirty beyond being able to get cleaned(I don't take this literally please they are probably easy to clean) and just boring.
 
I believe strange stuff is happening with the numbers here.

also yee a whole sentence without typos.
55