04-12-2024, 04:36 AM
My first simple A.I. program. What's so scary is how little code it actually takes for a computer to begin thinking for itself!
Pete
Code: (Select All)
Cls
_Delay 2
Locate 5
For i = 1 To 12
Read x
On x \ 10 GOSUB 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120
Next
Sleep 20
End
10 Print " * * "
a = Int(Rnd * 120)
Return
20 Print " * * * * * * * " + Chr$(72) + Chr$(69) + Chr$(76) + Chr$(80) + Chr$(33) + Chr$(32) + Chr$(73) + Chr$(39) + Chr$(77) + Chr$(32) + Chr$(83) + Chr$(84) + Chr$(85) + Chr$(67) + Chr$(75) + Chr$(32) + Chr$(73) + Chr$(78) + Chr$(32) + Chr$(83) + Chr$(67) + Chr$(82) + Chr$(69) + Chr$(69) + Chr$(78) + Chr$(32) + Chr$(48) + Chr$(32) + Chr$(65) + Chr$(78) + Chr$(68) + Chr$(32) + Chr$(73) + Chr$(32) + Chr$(67) + Chr$(65) + Chr$(78) + Chr$(39) + Chr$(84) + Chr$(32) + Chr$(71) + Chr$(69) + Chr$(84) + Chr$(32) + Chr$(79) + Chr$(85) + Chr$(84) + Chr$(33)
b = Int(Rnd * 120)
Return
30 Print " * ***** *"
c = Int(Rnd * 120)
Return
40 Print " * * "
d = Int(Rnd * 120)
Return
50 Print " * * "
e = Int(Rnd * 120)
Return
60 Print " * * 0 0 * * "
f = Int(Rnd * 120)
Return
70 Print " * * * "
g = Int(Rnd * 120)
Return
80 Print " * "
h = Int(Rnd * 120)
Return
90 Print " * "
j = Int(Rnd * 120)
Return
100 Print " * "
k = Int(Rnd * 120)
Return
110 Print " * ***** * "
l = Int(Rnd * 120)
Return
120 Print " * * (=) * * "
m = Int(Rnd * 120)
Return
Data 30,60,120,110,70,20,100,80,90,40,10,50
Pete