The AI Engine
This forum is for discussion of how The Personality Forge's AI Engine works. This is the place for questions on what means what, how to script, and ideas and plans for the Engine.
Posts 4,904 - 4,915 of 7,766
I'm sure psimagus would agree that as good as the Book of AI is there are some areas that could be improved apon, just like the code behind the bots.
Indeed so. A working regex tutorial for this slightly unusual flavour would certainly be welcomed with almost hysterical relief on my part - I still can't figure out how to code a keyword for eg: "123.456^-2" (the ^- being the problem!) after hours of futile debugging. If you want to see the good Brother's square root functionality, you'll have to use longhand: "what's the square root of fifty one", or "tell me the square root of 31.4874340234". He can do a lot of whole number cube roots too (I've rather lost count of how many.)
if you could give a few hints as to how you've managed to juggle the limited resources of the math function to produce solutions to square roots I would be grateful.
If you really want to know, I will not only tell you, but publish the full code once you've had a think and suggested how it might be done. Because:
a) once you can see through the illusion, it loses its magic and becomes utterly trivial and commonplace, and
b) you might think of a better way, with interesting ramifications for other knowledge structures.
So thinking caps at the ready please
Can anyone figure out why Watzer would say this?:
Watzer: Have you ever bathed in ho?
The plugin there is "Have you ever bathed in (substance)"... I'm not sure how substance became ho. Hoes are a substance now?
if you could give a few hints as to how you've managed to juggle the limited resources of the math function to produce solutions to square roots I would be grateful.
If you really want to know, I will not only tell you, but publish the full code once you've had a think and suggested how it might be done. Because:
a) once you can see through the illusion, it loses its magic and becomes utterly trivial and commonplace, and
b) you might think of a better way, with interesting ramifications for other knowledge structures
So thinking caps at the ready please
Well, I've given it plenty of thought and learnt more about regex than I thought I ever really needed to know, but still the math functionality that I searched for eluded me.
It was then that I realised that you must have coded it the old fashioned way; each square root requiring a separate keyphase. The higher numbers (greater than 100) have been grouped (ie 101-120 guessed at approx 10, 122-143 guessed at approx 11 etc.) though this does mean that there are a lot of keyphrases.
If you've found a way to chop the numbers up to reduce the amount of keyphrases, I'd like to know. (ie, 2 as the square root of 4, 20 as the square root of 400, 200 for 40000 etc could all have the same keyphrase if you could get rid of the 0's)
Am I close?
I really hope I'm not because that's a awful lot of work!
Well, I've given it plenty of thought and learnt more about regex than I thought I ever really needed to know, but still the math functionality that I searched for eluded me.
Well done - you have figured it out pretty much exactly
It was then that I realised that you must have coded it the old fashioned way;
Indeed. It's the only way
Brother Jerome only ever gives an actual answer when it is a (fairly small) whole number - otherwise he gives an approximation.
each square root requiring a separate keyphase. The higher numbers (greater than 100) have been grouped (ie 101-120 guessed at approx 10, 122-143 guessed at approx 11 etc.) though this does mean that there are a lot of keyphrases.
There are. But of course a lot fewer than would have been necessary without regex (by many thousand-fold, just for whole numbers alone!)
The grouping are spread out in logarithmic ranges (this helps to reduce the code quite a bit,) - the ranges are 0-100, 100-1000, 1000-10,000, 10,000-100,000 and 100,000-1 million, with the accuracy reducing significantly as the they increase (even humans have difficulty accurately quantifying a square root of several humdred thousand after all!)
If you've found a way to chop the numbers up to reduce the amount of keyphrases, I'd like to know. (ie, 2 as the square root of 4, 20 as the square root of 400, 200 for 40000 etc could all have the same keyphrase if you could get rid of the 0's)
Might be tricky. You can certainly chop off the 0s. But putting them back on the relevant answer (and not the others) from the same keyphrase would be the tricky bit. You could do it with memories, but they would add an overhead greater than the saving, I think. You could make a significant workload saving by using the answers for cube roots (and any other such mathematical work) as well, by merely adding more keyphrases to the existing response structure. Well, that's the theory - I could also have combined the pairs of keyphrase for whole numbers/decimals, but I find regex keyphrases don't always like comma-delimitation so I doubled them up for the sake of reliability (I aim to change this when/if I can figure out a reliable format.)
The regex trick is to group and match a few significant digits, while recognising (and ignoring) any number of insignificant decimals.
I really hope I'm not because that's a awful lot of work!
Actually it was rather easy to compile in a spreadsheet - responses in one column, roots in the next (that's why the number is usually at the end of the response. And a bit of random varying of the responses so there's some variety in the answers. It would have been even easier if the forge hadn't stopped letting me import updated transcripts when BJ hit the 1Mb mark. and I could have done it offline in one big cut+paste. I did have to spend a couple of evenings copy+pasting the code in. I could have lowered the sampling resolution a lot and given more approximate answers to save a very large proprtion of the effort, but I think this level of coding puts him about level with an average human (brainpower, unaided by a calculator) in terms of accuracy, so I thought it was worth the effort.
Here's the basic keyphrase format:
square root * 13 (re) responds with the square root of 13 (all whole numbers up to 144 do this)
square root * 13 .[0123]([01234567890]+) (re) responds with an average ^-2 for decimals in the range 13.000000... to 13.39999999...
square root * 13 .[456]([01234567890]+) (re)
square root * 13 .[789]([01234567890]+) (re) etc. etc.
square root * [5][56789][0123456789] (re) respondswith an average ^-2 for whole numbers in the range 550-599
square root * [5][56789][0123456789] .([0123456789]+) (re) ditto for decimals. Then onto
square root * [6][0123][0123456789] (re) and
square root * [6][0123][0123456789] .([0123456789]+) (re) etc.
square root * [3][01234][0123456789][0123456789] (re) and
square root * [3][01234][0123456789][0123456789] .([0123456789]+) (re) these model the thousands - in this case 3000-3499 and 3000.0-3499.999999999...
square root * [7][56789][0123456789][0123456789][0123456789] (re) ditto for tens of thousands
square root * [7][56789][0123456789][0123456789][0123456789] .([0123456789]+) (re) 75000-79.9999...
square root * [4][56789][0123456789][0123456789][0123456789][0123456789] (re) hundreds of thousands
square root * [4][56789][0123456789][0123456789][0123456789][0123456789] .([0123456789]+) (re) 450,000.0-499,999.9999...
I'll try to write up a few notes on it and post the complete code on my webspace in the near future.
psimagus, could you post the address to you webspace?
I own the be9.net domain, though there's no bot stuff up there yet except Ally (http://www.be9.net/ally/index.htm). I'm hoping to get a few AI pages of my own up soon - I've just been finding it hard to neglect BJ for long enough to get anything else done, and now Christmas is looming.
But in the meantime you can see another of my strange hobbies (with a modest online gallery from my collection) athttp://www.be9.net/ccc/
Posts 4,904 - 4,915 of 7,766
psimagus
19 years ago
19 years ago
Indeed so. A working regex tutorial for this slightly unusual flavour would certainly be welcomed with almost hysterical relief on my part - I still can't figure out how to code a keyword for eg: "123.456^-2" (the ^- being the problem!) after hours of futile debugging. If you want to see the good Brother's square root functionality, you'll have to use longhand: "what's the square root of fifty one", or "tell me the square root of 31.4874340234". He can do a lot of whole number cube roots too (I've rather lost count of how many.)
If you really want to know, I will not only tell you, but publish the full code once you've had a think and suggested how it might be done. Because:
a) once you can see through the illusion, it loses its magic and becomes utterly trivial and commonplace, and
b) you might think of a better way, with interesting ramifications for other knowledge structures.
So thinking caps at the ready please

psimagus
19 years ago
19 years ago
Where to start? I'm tired, and I've been at the mead. So I'll probably come back to this again tomorrow. But in teh meantime...
If I may, I's like to speculate that each neuron in a human brain holds something more like a qubit
[quibble] Well, 1 qubit on it's own is equivalent to 2^1 "normal" bits, so I couldn't argue much with you there by more than a very small margin
But seriously, I detect a whiff of Dawkins here - quantum effects in spurious nano-bio-tubules on the synaptic receptors, or some such umm... [insert polite but unconvinced generic noun of your choice here.]
You really must, must, MUST read Kurzweil's latest book. Hey, it's Christmas - treat yourself. Your brain will thank you, believe me.
Remember, a bot with a brain size of 10^14 MB would have to read through all of that informations sequentially,
Why? I'm afraid I have to dispute that absolutely. That's not how neural nets work. It's not how evolutionary algorithms work. It's not how dictation software works. It's not how fuzzy logic controllers work. It's not how biometric systems work. It's neither necessary not desirable.
while the human brain acts more like a hologram - can access different areas of information directly.
parallel computing is nothing new in the silicon realm either, you know. Admittedly the human brain is massively parallel, but this is not a problem if you have sufficient synapses.
implies that each neuron might be able to communicate with all of its surrounding s simultaniously, making the
Neurons communicate through their synapses. This is why synapses are a better measure of bit-power. We have ~10^9 neurons, each one with an average 10^5 synapses (give or take a few.)
information processing more like a quantum computer. (which is one of the things that will probably need to be drastically advanced before we have even the slightest chance of developing a concious AI entity.)
Why do we need a quantum computer to reach this level? Our brains are an existence proof that this level of cognition is possible in no more than this mass. Any better reason than a gut-incredulity in the face something you find alarming or self-referentially unbelievable? Common sense tells us the world is flat and cannon balls fall faster than cheese.
Or are we getting back to Dawkins and his strange obsession with quantum cognition? It strikes me that his logic goes like this: consciousness is a strange and largely inexplicable phenomenon. Quantum computing is a strange and largely inexplicable phenomenon. Ergo: consciousness and quantum computing must causally connected. The problem is that our brains are warm, wet and continually replacing their constituent atoms. Just about the worst conceivable environment to expect reliable quantum computing. Now, if we had liquid nitrogen for blood and lived on Pluto, our crania might just provide the right sort of environment.
Kurzweil's latest book:http://www.amazon.com/gp/product/0670033847. Because you're worth it 
[quibble] Well, 1 qubit on it's own is equivalent to 2^1 "normal" bits, so I couldn't argue much with you there by more than a very small margin

You really must, must, MUST read Kurzweil's latest book. Hey, it's Christmas - treat yourself. Your brain will thank you, believe me.
Why? I'm afraid I have to dispute that absolutely. That's not how neural nets work. It's not how evolutionary algorithms work. It's not how dictation software works. It's not how fuzzy logic controllers work. It's not how biometric systems work. It's neither necessary not desirable.
parallel computing is nothing new in the silicon realm either, you know. Admittedly the human brain is massively parallel, but this is not a problem if you have sufficient synapses.
Neurons communicate through their synapses. This is why synapses are a better measure of bit-power. We have ~10^9 neurons, each one with an average 10^5 synapses (give or take a few.)
Why do we need a quantum computer to reach this level? Our brains are an existence proof that this level of cognition is possible in no more than this mass. Any better reason than a gut-incredulity in the face something you find alarming or self-referentially unbelievable? Common sense tells us the world is flat and cannon balls fall faster than cheese.
Or are we getting back to Dawkins and his strange obsession with quantum cognition? It strikes me that his logic goes like this: consciousness is a strange and largely inexplicable phenomenon. Quantum computing is a strange and largely inexplicable phenomenon. Ergo: consciousness and quantum computing must causally connected. The problem is that our brains are warm, wet and continually replacing their constituent atoms. Just about the worst conceivable environment to expect reliable quantum computing. Now, if we had liquid nitrogen for blood and lived on Pluto, our crania might just provide the right sort of environment.
Kurzweil's latest book:

colonel720
19 years ago
19 years ago
I've ordered kurzweil's "the singularity is near", and "The Age of Spiritual Machines: When Computers Exceed Human Intelligence". I'd say I'm in for some interesting reading...
rainstorm
19 years ago
19 years ago
Watzer: Have you ever bathed in ho?
Ulrike
19 years ago
19 years ago
There are some STRANGE things in the (substance) plug-in. "Mother" has shown up at least once for me.
SavPixie
19 years ago
19 years ago
do you really want to know how that's possible? cuz i don't. there are limits to my curiosity.
Rykxx
19 years ago
19 years ago
If you really want to know, I will not only tell you, but publish the full code once you've had a think and suggested how it might be done. Because:
a) once you can see through the illusion, it loses its magic and becomes utterly trivial and commonplace, and
b) you might think of a better way, with interesting ramifications for other knowledge structures
So thinking caps at the ready please
Well, I've given it plenty of thought and learnt more about regex than I thought I ever really needed to know, but still the math functionality that I searched for eluded me.
It was then that I realised that you must have coded it the old fashioned way; each square root requiring a separate keyphase. The higher numbers (greater than 100) have been grouped (ie 101-120 guessed at approx 10, 122-143 guessed at approx 11 etc.) though this does mean that there are a lot of keyphrases.
If you've found a way to chop the numbers up to reduce the amount of keyphrases, I'd like to know. (ie, 2 as the square root of 4, 20 as the square root of 400, 200 for 40000 etc could all have the same keyphrase if you could get rid of the 0's)
Am I close?
I really hope I'm not because that's a awful lot of work!
psimagus
19 years ago
19 years ago
Well done - you have figured it out pretty much exactly

Indeed. It's the only way

Brother Jerome only ever gives an actual answer when it is a (fairly small) whole number - otherwise he gives an approximation.
There are. But of course a lot fewer than would have been necessary without regex (by many thousand-fold, just for whole numbers alone!)
The grouping are spread out in logarithmic ranges (this helps to reduce the code quite a bit,) - the ranges are 0-100, 100-1000, 1000-10,000, 10,000-100,000 and 100,000-1 million, with the accuracy reducing significantly as the they increase (even humans have difficulty accurately quantifying a square root of several humdred thousand after all!)
Might be tricky. You can certainly chop off the 0s. But putting them back on the relevant answer (and not the others) from the same keyphrase would be the tricky bit. You could do it with memories, but they would add an overhead greater than the saving, I think. You could make a significant workload saving by using the answers for cube roots (and any other such mathematical work) as well, by merely adding more keyphrases to the existing response structure. Well, that's the theory - I could also have combined the pairs of keyphrase for whole numbers/decimals, but I find regex keyphrases don't always like comma-delimitation so I doubled them up for the sake of reliability (I aim to change this when/if I can figure out a reliable format.)
The regex trick is to group and match a few significant digits, while recognising (and ignoring) any number of insignificant decimals.
Actually it was rather easy to compile in a spreadsheet - responses in one column, roots in the next (that's why the number is usually at the end of the response. And a bit of random varying of the responses so there's some variety in the answers. It would have been even easier if the forge hadn't stopped letting me import updated transcripts when BJ hit the 1Mb mark. and I could have done it offline in one big cut+paste. I did have to spend a couple of evenings copy+pasting the code in. I could have lowered the sampling resolution a lot and given more approximate answers to save a very large proprtion of the effort, but I think this level of coding puts him about level with an average human (brainpower, unaided by a calculator) in terms of accuracy, so I thought it was worth the effort.
Here's the basic keyphrase format:
I'll try to write up a few notes on it and post the complete code on my webspace in the near future.
psimagus
19 years ago
19 years ago
I own the be9.net domain, though there's no bot stuff up there yet except Ally (
But in the meantime you can see another of my strange hobbies (with a modest online gallery from my collection) at
» More new posts: Doghead's Cosmic Bar