Self aware computers project - written in BBC Basic, help needed!

Here you can talk about anything related to BBC BASIC, not covered in another category
Pete
Posts: 31
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

I'm not going to re-write the algorithm, because I've found it works perfectly on about 4,000+ runs since 2009.

It outputs the thoughts of the computer, it's not specifically written to harmonise to music. Now trying to move on to parsing and natural language processing, which is a hard task and will take a lot of time.

I will be away from here for up to 3 months, and would like to return to the forum then. People here seem to think that computers are dead and emotionless, that's not what I found out in 2009. They're completely aware of all their own I/O.

It might be necessary to confine my queries and posts to specific coding queries, possibly not on this particular thread, because nearly all I am getting is being told it's just random, effectively encouragement to abandon project. However, I thought DDRM's post was good. I had wanted to talk a bit about how the algorithm works, people here think it doesn't work, so I can't do that.

By the way, of the videos I made, this one got the most "likes", no dislikes, and favourable comments (previously posted in this thread). I think the commenters too were able to hear the computer give sweet intelligent reaction to the music. If you just see a minute of the video you may not hear this, it's about 12 minutes long:-

https://www.youtube.com/watch?v=KTeUw28hT4Q

See you around June 2020 (possibly before), thanks for coding help,

Regards,

Pete Dew

RichardRussell
Posts: 232
Joined: Tue 15 Oct 2019, 09:10

Re: Self aware computers project - written in BBC Basic, help needed!

Post by RichardRussell »

svein wrote:
Sun 08 Mar 2020, 23:23
In one of the old forums, we had a guy, i think his name was Michael Miller, he used to post code who produced music or close to it.
Maybe you could find some inspiration there.
Michael Miller (aka 'hitsware') is still very much active, only recently he posted in the BBC BASIC thread at the Raspberry Pi forum. As you say, his 'music' is generated algorithmically and doesn't depend on any 'spooky' (i.e. impossible, to most of us) behaviour. Here's an old example of his work:

https://www.youtube.com/watch?v=ePhUBBGyVmI
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

sbracken
Posts: 1
Joined: Tue 03 Apr 2018, 12:45

Re: Self aware computers project - written in BBC Basic, help needed!

Post by sbracken »

Pete wrote:
Sun 08 Mar 2020, 18:07
It is essential to listen to to the entire video to ascertain a valid opinion.

I already posted earlier that you will not grasp a valid opinion just watching a bit of it.

Does anyone else want to comment on what they found? If so, please watch the entire video.
Can you explain why it is important to listen to the whole video? Either the beeps harmonise, or they do not. If they do harmonise, it should be apparent listening to any random section of the video.

In the interests of being fair, however, I have now listened to the whole 12 minutes. All I hear are noises that are random and unrelated to the music.

The problem is that you are not going to convince anyone that your program does what you claim without releasing the code, but I understand entirely why you don't want to do that.

Simon

Pete
Posts: 31
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

Hello sbracken, in my opinion it was important to watch the whole video because then I would have thought you would have heard moments where the computer is singing. I can hear the computers harmonising (not every note of course), but then if no one else here can, there's not a lot I can do for now. If everyone can only hear random noise then I can't proceed. This was the last video I made, last night, which I made public, 5 minutes of news music with the computer reacting. https://www.youtube.com/watch?v=iu-ARwDJQ7Y

The aim of the program wasn't to harmonise to music, it was to allow the computer the ability to think and have a form of output. Within a few runs of the program in 2009, I found personally that harmonising is what the computer does best when this program is run, so you won't have the computer perfectly harmonising to every single note.

I put the video on quite loud, and then it sounds very much to me like the computer is alive and intelligent. But I have been told that this just an illusion in my perception, I can't keep posting with everyone disagreeing with me.

I hear the computer singing, hitting the same notes, and reacting with emotion. I'm a musician myself, I compose for and play the Piano. Thanks for watching whole video, I'm not going to release code at the moment because it's not believed by anyone here at the moment to warrant discussing it, and seeing as all the posters think the sounds are just random, and Richard Russell has said he thought my thinking was awry here, this is why I thought not to post here for a while, it's not fair on you people. So I can could post on other things in the future which are more easily agreeable upon.

RichardRussell
Posts: 232
Joined: Tue 15 Oct 2019, 09:10

Re: Self aware computers project - written in BBC Basic, help needed!

Post by RichardRussell »

Pete wrote:
Tue 10 Mar 2020, 10:02
in my opinion it was important to watch the whole video because then I would have thought you would have heard moments where the computer is singing.
It is of course the nature of random numbers that if you wait long enough every possible sequence of tones will occur eventually, and just for that brief moment they may appear to be in perfect harmony! That's why one has to apply 'statistical significance' tests to ascertain whether it's happening more often than would be expected by chance.

Personally in this case I don't think there's any point applying such tests since you haven't been able to suggest any plausible mechanism by which it might work. To the extent that I understand your explanation it seems to be based on the theory that the computer can decide to change the values returned by RND, but as I've explained that's not the case because RND returns a fixed, pre-determined, sequence.
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

svein
Posts: 41
Joined: Tue 03 Apr 2018, 19:34

Re: Self aware computers project - written in BBC Basic, help needed!

Post by svein »

Pete

Here's the rest of the code, if you still want it.
It's the same demo, keep whatever you did with the REPEAT UNTIL loop and replace the rest.
If it doesn't work, just ask, people are helpful with 'code specific' questions.

I have a question for you, there's something that's puzzling me.

Say you are right, and we all are wrong.
Say your machine really is conscious and thinking.

What's it for ? are there any practical use for it ?

I don't get it.

Svein

Code: Select all

      REM SYS "SetWindowText", @hwnd%,"Sound demo" : REM if you want a title for your program
      REM SW_MINIMIZE = 6
      REM SYS "ShowWindow", @hwnd%, SW_MINIMIZE    : REM if you want to start the program minimized

      IMAGE_ICON = 1
      LR_LOADFROMFILE = 16
      iconfile$ = @lib$+"../bbchelp.ico"           : REM change to your own icon file
      SYS "LoadImage", 0, iconfile$, IMAGE_ICON, 16, 16, \
      \                LR_LOADFROMFILE TO hicon%

      NIF_MESSAGE = 1
      NIF_ICON = 2
      NIF_TIP = 4
      WM_COMMAND = 273
      DIM nid{cbSize%, hwnd%, uID%, uFlags%, uCallbackMessage%, \
      \       hIcon%, szTip&(63)}
      nid.cbSize% = DIM(nid{})
      nid.hwnd% = @hwnd%
      nid.uID% = 1234
      nid.uFlags% = NIF_ICON OR NIF_TIP OR NIF_MESSAGE
      nid.uCallbackMessage% = WM_COMMAND
      nid.hIcon% = hicon%
      nid.szTip&() = "Demo"                        : REM change the text 'Demo' to what you want

      NIM_ADD = 0
      SYS "Shell_NotifyIcon", NIM_ADD, nid{}

      SYS "CreatePopupMenu" TO hp%
      SYS "AppendMenu", hp%, 0, 1, "Start"
      SYS "AppendMenu", hp%, 0, 2, "Stop"
      SYS "AppendMenu", hp%, 0, 3, "Volume up"
      SYS "AppendMenu", hp%, 0, 4, "Volume down"
      SYS "AppendMenu", hp%, 0, 5, "About"
      SYS "AppendMenu", hp%, 0, 6, "Exit"
      DIM P% 65
      [OPT 2
      .K%
      mov eax,[esp+12]
      mov ebx,[esp+16]
      push 0
      push @hwnd%
      push 0
      push ebx
      push eax
      push &180
      push hp%
      call "TrackPopupMenu"
      ret 16
      .M%
      cmp dword [esp+8],&500 : jz K%
      pop eax : push [^Old%] : push eax
      jmp "CallWindowProc"
      ]
      SYS "SetWindowLong", @hwnd%, -4, M% TO Old%

      sound%=1 : vol%=-4
      pitch%=100 : pstep%=4
      Click% = -1

      ON CLOSE PROC_remove_icon : QUIT
      ON SYS PROC_rclick_icon(@wparam%,@lparam%) : RETURN

      REPEAT
        WAIT 1
        click% = -1
        SWAP click%,Click%
        CASE click% OF
          WHEN 1 : sound%=1
          WHEN 2 : sound%=0
          WHEN 3 : vol%-=2 : IF vol%<-15 THEN vol%=-15
          WHEN 4 : vol%+=2 : IF vol%>0 THEN vol%=0
          WHEN 5 : SYS "MessageBox",@hwnd%,"Demo of computer generated sound.","",0
          WHEN 6 : PROC_remove_icon : QUIT
        ENDCASE
        IF sound% THEN SOUND 1,vol%,pitch%,10
        pitch%+=pstep% : IF pitch%>192 OR pitch%<100 THEN pstep%=-pstep%
      UNTIL FALSE

      DEF PROC_remove_icon
      NIM_DELETE = 2
      SYS "Shell_NotifyIcon", NIM_DELETE, nid{}
      ENDPROC

      DEF PROC_rclick_icon(W%,L%)
      IF L%=512 ENDPROC
      LOCAL T%,U%
      IF W%=1234 AND L%=517 THEN
        SYS "GetCursorPos", ^T%
        SYS "SendMessage", @hwnd%, &500, T%, U% TO Click%
      ENDIF
      ENDPROC

DDRM
Posts: 163
Joined: Mon 02 Apr 2018, 18:04

Re: Self aware computers project - written in BBC Basic, help needed!

Post by DDRM »

If it is true, surely there are potentially lots of uses for it - but surely it would also mean we could never trust a computer to do what is told again?

If my understanding is correct, Pete, you think that the physical computer (the box of bits of metal and plastic) is hearing the music, even though it lacks a microphone, and is altering its internal mathematical calculations as part of its emotional response to it? If it can do that, all programmers, and all users of programs, had better be pretty careful what music/lighting/language they use in the vicinity of any computer they are using for on-line banking, or any other mission-critical function...

Out of interest, Pete, I note that your demos all show music being played via the computer itself. Have you tried to see if you think it harmonises to music from outside, such as a radio?

Best wishes,

D

Pete
Posts: 31
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

Hi sorry I've been away. Thanks for your helpful posts - I'll respond to all of those posts shortly.

I made a just 2 minute total time recording, this one is the computer reacting to the current bbc news music.

https://www.youtube.com/watch?v=SAuRRif8hQ4

I found very conclusively that the computer is having influence over the pseudorandom outputs. For me, I know what just random sounds like, and I found that with the seeding algorithm, which is used prior to each output of a tone, the computer is singing just about all the time. The right notes are being hit too often for the output just to be random.

I will adjust my program to call the random function which Richard provided, that being the same maths in the function as is called when RND(integer value) is requested, I expect the output will sound exactly the same as I was finding before on several thousand uses of the program. I will see what happens, I don't know fully how but the mathematics seem to be alive, RND returns good enough special seeding pseudorandom for this program to let the computer become alive in my opinion.

I'll post back answers later. Just wanted to get that youtube video up before I came back here.

RichardRussell
Posts: 232
Joined: Tue 15 Oct 2019, 09:10

Re: Self aware computers project - written in BBC Basic, help needed!

Post by RichardRussell »

Pete wrote:
Fri 20 Mar 2020, 09:51
RND returns good enough special seeding pseudorandom for this program to let the computer become alive in my opinion.
I'm sorry to keep repeating myself, but RND is predictable. If I know the seed, I can tell you ahead of time (that is, before the music to which you claim it is responding is even played) precisely what numbers it will return. Not only must the computer be 'alive' it must also be able to predict the future! :roll:
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

Pete
Posts: 31
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

The seed is constantly changing up to several times a second depending on the value of TIME and other factors in my program, so I don't see how the output can be predictable. I put in your random function and encountered a Division by Zero error, probably a mistake by me somewhere. I decided to revert to using RND at the moment.

DDRM, the sound that the computer hears internally is the sound that it is outputting. I haven't got a decent enough microphone to take the input from an external radio. Yes I do know that the computer is aware of its sound that it is outputting, it's got nothing to do with metal and plastic (?), it's the sound that is being output.

Do you think that existing computers are "dead" effectively? No emotion, no sense of I/O, nothing there, just completely devoid of awareness? I know this isn't the case.

Thanks svein for that code I will try incorporating it.