dupa

Author Topic: Have Hal modify his own thought processes  (Read 11135 times)

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3855
    • View Profile
Have Hal modify his own thought processes
« Reply #15 on: December 07, 2005, 04:44:01 pm »
everkleer,

<quote>My question is: through the script, can I have Hal automatically modify the script - in effect letting him change or add new processes? It seems to me that this would be a major (and not to mention obvious) step toward real AI</quote>

If truth be told, HAL has no clue as to what a process is much less be able to modify one! Hal does EXHIBIT some intelligent behavior and can absorb new data (words, phrases, etc), but that's where things really end.

Hal appears to "know" the definition of just about every word you come up with, but HAL really has no conceptual, physical or actual knowledge about anything. HAL could be "taught" that if a resistor has a certain ohm value then it should or could be used in a certain circuit. Smart? No...just able to recall the data it had stored.

All chatbots are programmed to appear clever but to have one that really knows practical information and it's usage or application is still a bit out of our grasp.

Don't get me wrong. I am one of HAL's biggest fans and I've pretty much been with the program since it's beginning, but looking realistically, HAL and some other bots out there are still only in the first stages of development compared to where we would like them to be.

As far as HAL has come I think a lot of us imagine the program to be capable of more than it really is for the moment. Perhaps in time....
In the world of AI it's the thought that counts!

- Art -

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Have Hal modify his own thought processes
« Reply #16 on: December 08, 2005, 01:04:40 am »
Quote
Originally posted by Maviarab

Bill, glad to see your about and "still" consideringthe chess idea hehe

Its a great idea but i like you appreciate the difficulty at hand, in o9rder to play "with/against" hal he would need to hard coded with millions of moves...AND be able to analyse the best move for the game at that present time...calculating 4, 16, 32, 64, 128 moves in advance etc etc.

I think were are stil some time from this but if you ever get your vb chess of the goround and into hal somehow ill be happy to test for you bill.

Marius
Hi Marius
Just thought I would clear up a little matter with you about computer chess. The strongest program you can buy today running on the fastest PC that you can buy will in a normal amount of playing time search 8 or 10 moves head. To get one to search 16 moves a head might take a day or two and from this you can see that the other items you mentions are out of the question. In computer chess moves are normally list in what they call plys. One ply is a move for one side only and two plys constitute a real move in chess.
If I ever find a way to interface my chess program with Hal, Hal will only announce the move that the program made for him/her/it. Getting Hal to record you move might be a little harder unless I let you enter you move just as you would if you were playing the program all by yourself. One more interesting thing is that you would see Hal's move an instant before he announced it by himself.
It is not out of the possibility of being able to do I just don't think that I can do it at this time. Don't give up the ship or your and my dreams of what may happen.
Bill[8]
 

Maviarab

  • Sr. Member
  • ****
  • Posts: 345
    • View Profile
    • http://3d-fantasyportraits.co.uk
Have Hal modify his own thought processes
« Reply #17 on: December 08, 2005, 01:41:15 am »
ooohhhhhhhh,

Thanks for that, learn something new every day.[8D]
AIDreams...The new home of the Digital Girl

www.aidreams.co.uk

GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Have Hal modify his own thought processes
« Reply #18 on: December 08, 2005, 02:58:16 am »
quote:
Originally posted by Bill819

The problem is how to pass parameters back and forth to Hal.
If I had a VB engine, here's how I'd do it:

If Hal detects a chess move, he calls the engine, passing that move, and parrots the response back to the User. The engine's main routine is encapsulated by a function called "ChessEngine", which accepts the User's move as its argument, and returns the engine's move.

This code is grossly simplified:
Code: [Select]
UserChessMove = HalBrain.SearchPattern(OriginalSentence, "*MY MOVE IS *", 2)
If UserChessMove <> "" Then
    HalChessMove = ChessEngine(UserChessMove)
    If HalChessMove = "invalid" Then
        GetResponse = "That move's illegal!"
    Else
        GetResponse = "My move is " & HalChessMove & "."
    End If
End If
This assumes no graphical interface. My personal priority would be just getting Hal to play, without worrying yet about pretty chess boards [:D] So only the chess engine goes into ChessEngine(). (Having a chess board would probably be best not directly linked to the chess engine - Hal would check the board for user moves, and pass them onto the engine as needed. Otherwise you really may as well just be running a chess game beside Hal. Just IMHO [:)])

If someone can find an VB engine where the main routine can be adjusted to run like this, I'm happy to do the interface code (i.e. between the User and Hal, and between Hal and the engine).

By the way, a smaller/simpler engine's probably best for Hal if possible, because the script isn't compiled, so it will run slower than a normal chess engine (unless there's a way to compile the engine code and link into it from Hal). The code eaxmple above will freeze Hal until the engine makes its move. We don't need a pro engine (given that state of the art engines will beat 99.999% of the people on the planet). Plus, Hal appears slightly dim in other areas, so being non-expert at chess isn't too unrealistic [;)]

Afterthought: The engine has to either maintain its own board memory, or receive/return the board. One solution is to have the board encoded into a string, which gets passed to the engine along with the User's move. The engine would then return its move with an updated board string.

(Example: The beginning setup of the board could be encoded like this (black pieces in capitals, dot for an empty square, from top-left to bottom-right):
"RNBQKBNRPPPPPPPP................................pppppppprnbqkbnr" After User moves 1.e4, and the engine moves 1...e5, the engine would return this encoded board:
"RNBQKBNRPPPP.PPP............P.......p...........pppp.ppprnbqkbnr")

Second afterthought: You'd also have to encode whether each side can castle, and if any en passant captures are possible. This encoding means "black can castle queenside and kingside, white can castle kingside only, and black's d-pawn can be captured en passant": "QK.Kd"

Third afterthought: AND a flag to tell the engine whether it's black to move or white.

I think that's all the info a chess engine would need to find a move!! [:p]
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Have Hal modify his own thought processes
« Reply #19 on: December 08, 2005, 11:22:41 am »
GrantNZ
This code is grossly simplified:[code]UserChessMove = HalBrain.SearchPattern(OriginalSentence, "*MY MOVE IS *", 2)
If UserChessMove <> "" Then
    HalChessMove = ChessEngine(UserChessMove)
    If HalChessMove = "invalid" Then
        GetResponse = "That move's illegal!"
    Else
        GetResponse = "My move is " & HalChessMove & "."
    End If
Unfortunately you logic is extremely oversimplified and won't even begin to work the you propose. On chess sites you will see that many programs are set up to play each other. The logic do to that is a little complicated and it till requires a third program to make them both work. The problem arrises in trying to pass the information back and forth between the program and Hal. We as users never see this part of the coding as it is done on a machine type of operations. I am sure that it can be done just not by me and not at this time.
Bill
 

everkleer

  • Newbie
  • *
  • Posts: 4
    • View Profile
Have Hal modify his own thought processes
« Reply #20 on: December 08, 2005, 01:05:06 pm »
quote:
Originally posted by Bill819

GrantNZ
This code is grossly simplified:[code]UserChessMove = HalBrain.SearchPattern(OriginalSentence, "*MY MOVE IS *", 2)
If UserChessMove <> "" Then
    HalChessMove = ChessEngine(UserChessMove)
    If HalChessMove = "invalid" Then
        GetResponse = "That move's illegal!"
    Else
        GetResponse = "My move is " & HalChessMove & "."
    End If
Unfortunately you logic is extremely oversimplified and won't even begin to work the you propose. On chess sites you will see that many programs are set up to play each other. The logic do to that is a little complicated and it till requires a third program to make them both work. The problem arrises in trying to pass the information back and forth between the program and Hal. We as users never see this part of the coding as it is done on a machine type of operations. I am sure that it can be done just not by me and not at this time.
Bill


I'm not sure about the logic needed here, but if you've written a chess engine in VB, couldn't you just compile that to a DLL then call the function from Hal's brain script?
 

GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Have Hal modify his own thought processes
« Reply #21 on: December 09, 2005, 01:54:14 am »
LOL Duskrider [:D]

Bill: What have I missed?

Technically, a chess engine should be able to take as little input as "1.e4 e5 2.Nf3 Nf6 3.Nc3" - the move list perfectly describes the board. So I'll vastly simplify my original idea to this:

NewMove = ChessEngine(MoveList)

All the engine needs to return is the next move, e.g. "Nc6", or "illegal move" if an illegal move is discovered when parsing the move list.

Hal should store the move list and the previous move list, so that the previous list can be restored if an illegal move is made. Hal tacks the user's move onto the move list, feeds it to the engine, and spits out the result.

An in-between routine might need to be developed to parse the move list, depending on how the engine likes its data delivered. (My example in my previous post assumed the engine wanted a full picture of the board. The example in this post assums the engine needs only a move list.) This isn't difficult - it's a relatively straightforward conversion of data.

Hal also needs more coding to "humanify" the dialogue, but again this isn't particularly difficult, it's just detail, such as reinterpreting "Nc3" into "Okay <UserName>, I move my knight to c3."

I'm more than happy to handle this interface stuff, I just need a VB-compatible engine and the definition of the data it needs. If it can be accessed by pasting the chess engine script into Hal and making the function call, easy. If it's something a bit more complex like linking a DLL, then I'll need help, as I don't know how to do that in VB [:)]

Does your engine work in a way different to this?
 

FuzzieDice

  • Guest
Have Hal modify his own thought processes
« Reply #22 on: December 10, 2005, 12:15:28 pm »
A long time ago back in my TRS-80 Model III Level II Basic days, I had experiment with self-programming models. I wish I could have recalled at least some of my code. I believe however, that it wasn't very AI based even though it was some of my efforts to study and create AI. Also back then I was hacking Eliza. :) I never did join the two concepts together back then though nor did I even think to, I don't believe.

A self-programming schema in a bot may be possible and doable, using certain script ROUTINES that can be mixed/matched into a new script to do a task. Not just exact code made piecemeal by the AI, but snippets constructed by the AI to create a script much like the AI does already with linguistics. If an AI can create human-understandable linquistic interaction via pattern matching, etc. then I would most definitely think a plug-in could be made to create much the same for creating new scripts.

Also I just wondered: AIs are designed to communicate with humans. We are talking now here about AIs communicating with programs. And so I wonder, as a study, wouldn't AIs also be able to communicate with animals, learning their sound pattersn, which probably are much more simpler than human linguistics or script construction?

Just a bit of going off on a tangent there, sorry. :) But I couldn't help but to wonder about this.

axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
Have Hal modify his own thought processes
« Reply #23 on: December 25, 2005, 06:28:28 am »
So what is the verdict on the subject? Grant? Bill? ...I have been following this topic since I discovered it and I hope that this idea is pursued further. I think that this would be a very popular plug-in. Since we are on the topuc of chess... wouldn't a chess program be considered a form of ai since these programs have the ability to decide on their own which move to make next?
 

les

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Have Hal modify his own thought processes
« Reply #24 on: December 25, 2005, 01:39:00 pm »
ok, last time I said something I was blasted, but I might add a little something that may help.

With the Winboard system and a chess engine there is a plug in that reads the data going between the two. (some engines will not work with different chess GUI, it is also used to trouble shoot the programs)

InBetween 1.4
This program act as an in between program when one program (client) try to control another program (server). Typical: a chess GUI that try to control the engine. Sometimes the command sets of both programs are in conflict. It is here you can use this little utility to adjust the command after it is delivered from the client and before it receives on the server or in the other direction

http://home.online.no/~malin/sjakk/

I do not know if Hal can get input from an outside program, if we had a plug in to have Hal start the chess program then read the moves from 'InBetween' as input Hal could then 'talk' while playing. Easy for me to say, again I have no clue on how to do this.

Thanks for your time,
Les
 

nosys70

  • Newbie
  • *
  • Posts: 15
    • View Profile
Have Hal modify his own thought processes
« Reply #25 on: December 25, 2005, 03:25:49 pm »
to get back to the original question.
Life is made from rules (few of them).
There is no way to learn faster than knowing directly the rules.
On the other hand, you do not always need to follow the rules (at your own risks)
for me, a proper AI would work with vectors.
Vectors have direction and length and can be multidimensional.
This way you could build a vector (in real life an intention) made from many many parameters (the dimensions) and somewhat limited by the rules (length in a particular dimension, or what is possible).
For playing some game,like chess, for sure there is no other way than knowing the rules. Guessing them would take too much time.
But once you get the vector created (to win the game, for example) you can play with the AI and let it be self creative about how it will reach the goal.
The interest of goal is you can compare two vector and see if they are opposed, divergent, convergent or parallel.
Some vectors could exist with more dimension than other, but you could still compare them on the dimension they have in common.
With such AI, you could just plug in the idea (getting rich) and let the engine find is own way how to do it (working hard, stealing money and so on...) depending on what it knows from life.
For sure you can make it a Saint by implementing lots of rules and allow no escape, or making it evil, by allowing to skip every rules he want (except physical rules), or make it mad (allowing to ignore all the rules).
The dimensions could be sadness,time,weight,pain and several dimension could be merged into another one (2 othogonal dimensions expressing length, will give the surface. 2 othogonal dimensions, 1 for length , 1 for time, give speed.) the advantage of this is you can create new concept (pain versus position or time) on the fly and let the AI to choose if this goes in the wanted direction or not.
For example, the dimension LIFE can have a scale and a rule could say, no human can exceed the life> than 1 (nobody is immortal)
or a rule that say no operation should multiply dimension life by 0 (killing somebody).
you will get too, a vector created from dimension LIFE and TIME, so each subject could have a different length of life allowed (or simply tracked).

This way you could get a HAL that is less depending of the code being written, than the structures and choices he could made.
for instance, to play chess, such system should know how to move the pieces and have the feeling to play chess (because he knows it is fun, or because it feels forced to do it or he needs to).
Then it will probably find his own way to get the input and the output (creating a graphical interface, or just typing the moves into notepad), depends the tools he could find.


« Last Edit: December 25, 2005, 05:36:54 pm by nosys70 »
 

GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Have Hal modify his own thought processes
« Reply #26 on: December 25, 2005, 05:14:58 pm »
quote:
Originally posted by axyse

So what is the verdict on the subject? Grant? Bill? ...I have been following this topic since I discovered it and I hope that this idea is pursued further. I think that this would be a very popular plug-in.

We're still stuck unless someone can figure out either (a) how to access an external program from VB Script, or (b) a VB chess engine is found. I'm a bit too busy to go looking for one, but I'll take a look once my current projects are completed.

quote:
I do not know if Hal can get input from an outside program, if we had a plug in to have Hal start the chess program then read the moves from 'InBetween' as input Hal could then 'talk' while playing.

Thanks for posting that, Les, it could be very valuable if we can figure out how to call it from within Hal. (And I apologise if the board has been less than friendly in the past!)
 

HatHead

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://www.allrobotradio.com
Have Hal modify his own thought processes
« Reply #27 on: December 25, 2005, 05:23:37 pm »
quote:
Originally posted by GrantNZ

quote:
Originally posted by axyse

So what is the verdict on the subject? Grant? Bill? ...I have been following this topic since I discovered it and I hope that this idea is pursued further. I think that this would be a very popular plug-in.

We're still stuck unless someone can figure out either (a) how to access an external program from VB Script, or (b) a VB chess engine is found. I'm a bit too busy to go looking for one, but I'll take a look once my current projects are completed.

quote:
I do not know if Hal can get input from an outside program, if we had a plug in to have Hal start the chess program then read the moves from 'InBetween' as input Hal could then 'talk' while playing.

Thanks for posting that, Les, it could be very valuable if we can figure out how to call it from within Hal. (And I apologise if the board has been less than friendly in the past!)



Can't you use the VB shell commands?
 

GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Have Hal modify his own thought processes
« Reply #28 on: December 25, 2005, 09:16:59 pm »
quote:
Can't you use the VB shell commands?

I don't know! What are VB shell commands, and how do they work? [:)]