Hello all,
How would you code programmers put the "thoughts" of a machine into written form? My obvious guess is software code, but I don't know the grammar rules for it. For example, how would you write:
"Evidence 1 excludes Suspect A. Evidence 2 excludes Suspect B. Therefore investigation must focus on Suspect C."
?
Copyright © 2024 QUIZLS.COM - All rights reserved.
Answers & Comments
Verified answer
I have written a short pseudo code example below which uses graph theory to connect 2 separate graphs: Evidence & Suspects. It should be noted that the below code assumes that there is exactly one guilty criminal in the suspect list, AND there is sufficient evidence available prior to the detective work, else the logic breaks (greedy method implementation).
Create Suspect Map (not connected)
Create Evidence Map (not connected)
Map evidence to suspects using innocence/guilt indicator
while remaining suspect number > 1
... search for evidence
... if evidence proves innocence:
... ... Remove all suspects connected to it as innocence
... if evidence proves guilt:
... ... Remove all suspects not connected to it as guilt
end while
Focus on remaining suspect
Well, lol, I personally would argue that at the most-near-fundamental level (or any level really), ASM that is, there are no thoughts. Only calculations. The computer is just a very fast calculator, believe it or not. A super-calculator with many peripherals. lol
And if one were to attribute the word "thought" to a computer's underlying fundamental calculations, and I would have to use the term quite loosely, I would say the resultants are not quite as valuable, intelligible, or conceivable as a whole of unit; rather just a massive amount of consecutive logic appropriations and data manipulations across the bus.
Perhaps I misunderstand your question, and you are simply looking for this:
http://en.wikipedia.org/wiki/Pseudocode
In which case I'd say you answered your own question with your provided example. However, I'd like to note that you aren't really detailing the thoughts of a computer, but rather outlining your own intentions for the computer. Which is quite interesting considering the question, in my opinion. :)