|
这是我用vb6编的一个小程序主要为了证明奖惩学习的可行性。
软件有7个文本框、三个command按钮,text1到text4中的数字为环境变量text5为传出中枢兴奋的记忆柱。text6为主注意目的对象代表的记忆柱。text7为传入的信息。主要分两个中枢,第一个为1到12的基本记忆柱群,第二个是传出中枢为37到48的基本记忆柱群。总共有4个中枢,16个反应小区。 每个中枢有4个反应小区,每个反应小区有三个基本记忆柱群,分别由三个连续的数字表示,比如第一个反应小区包括1、2、3三个基本记忆柱群。每个基本记忆柱群只包含一个易兴奋的记忆柱及一个在基本记忆柱群抑制时兴奋的记忆柱。基本记忆柱群的易兴奋部分的RN包含在48*400之中,而抑制时兴奋的记忆柱的RN包含在48*400到48*400+48*60之间的RN之中,奖惩中枢、动力中枢的RN包含在48*400+48*60到48*400+48*60+4*200之中,每个记忆柱有200个RN,第1到47个RN是易兴奋的记忆柱的传入值,48到95为抑制的记忆柱的传入值,96到190是对应的时间。387是记忆柱达到兴奋值的时间。 四个text代表四种不同的环境刺激其中一种可带来奖赏(可任意按排),传出中枢的兴奋模式有四种兴奋模式与它们分别对应,如第37、40、43、46基本记忆柱群兴奋后软件输入的刺激信息为text2的。打个比方,就如有四个按钮,让小孩按,按其中一个会出现苹果这一奖赏刺激,而按其它的按钮会出现一些普通的非奖赏物品。那么经过几次奖惩学习后,小孩便会不断的按能给它带来奖赏的按钮。 通过奖赏学习的选择最终只是能带来奖赏的传入刺激信息被选择,而传出中枢也是与之对应的记忆柱兴奋。
这个小软件只是为了证明奖惩学习是可行的。 其具体流程是: 一、 点击文件建立按钮,智能软件的文件部分建立。 二、 点击停止按钮,timer1的interval变为1000,则程序运行,点击停止按钮,interval变为0则程序停止运行。 三、 1、根据传出中枢的兴奋确定输入那一text中的信息。 2、计算输入刺激所能对应兴奋的记忆柱的动力。 3、计算被选择出来准备兴奋的记忆柱的动力 4、计算如果发生奖惩刺激或无奖惩刺激时,相应记忆柱的奖惩记忆。 5、计算主注意目的对象的动力变化。 6、比较动力的大小,确定主注意目的对象。 7、如果主注意目的对象没有改变,则主注意对象为被选择出来准备兴奋的记忆柱。而如果主注意目的对象改变,则组成主注意目的对象的基本记忆柱群的易兴奋记忆柱之间建立相互兴奋的记忆联系,同时选择出被主注意目的对象所易化的且与奖惩中枢建立了一定联系的基本记忆柱群,并给它们以易化。 四、 周期性易化几个原始记忆柱群。 五、 由主注意对象的在抑制时兴奋的记忆柱兴奋、易化而按一定规律选择出易兴奋的原始记忆柱群作为准备兴奋的对象。 六、 被选择出的基本记忆柱群的易兴奋的记忆柱通过兴奋建立记忆联系(包括了与主注意对象的记忆联系)。
在编程的过程中为了简便,这个小软件的功能被我尽量的简化了。 1、 是并行存储,但由于反应小区及一个反应小区包含的基本记忆柱群较少,容易出现记忆干扰,而且记忆柱的联系与兴奋模式决定了它的兴奋不是模糊兴奋回忆。 2、 兴奋回忆模式比较简单,兴奋记忆的许多模式都没能让它实现。 3、 状态性回忆、兴奋没有,所以本软件实现的只能是最简单的奖惩学习。 4、 奖惩中枢、动力预期中枢都被最大限度的简化了。
另外text1到text4中的数字可以改变。也就是说环境刺激变量可以改变。Text中的前四个数字代表记忆柱,后两个数字分别代表奖惩刺激的情况,1代表奖或惩,0代表即无奖也无惩。
Public zhan Public t12
Private Sub Command1_Click() All = 22880 '所有的rn数 t12 = 0 For t = 1 To 25000 Put 1, t, -t12 Next t
For n = 1 To 48 '易兴奋的记忆柱,一个一个的记忆柱 'input For t = 1 To 95 Put 1, t + (n - 1) * 400, -t12 Put 1, t + (n - 1) * 400 + 95, Date + Time Next t 'output For t = 1 To 48 If t < n Then Put 1, t + (n - 1) * 400 + 190, n + (t - 1) * 400 End If If t > n Then Put 1, t - 1 + (n - 1) * 400 + 190, n + (t - 1) * 400 End If Next t '不易兴奋的记忆柱 For t = 1 To 48 Put 1, 48 * 400 + (n - 1) * 60 + t, n + 47 + (t - 1) * 400 Next t '与奖惩的联系 For t = 1 To 4 Put 1, 48 * 400 + (n - 1) * 60 + 48 + t, 48 * 400 + 60 * 48 + n + (t - 1) * 200 Put 1, 48 * 400 + 60 * 48 + n + (t - 1) * 200 + 48, Date + Time Next t Next n End Sub
Private Sub Command2_Click() Timer1.Enabled = True End Sub
Private Sub Command3_Click() Timer1.Enabled = False End Sub
Private Sub Form_Load() Command1.Caption = "文件建立" Command2.Caption = "开始" Command3.Caption = "结束" Text1.Text = 111100 Text2.Text = 222200 Text3.Text = 332110 Text4.Text = 123100 Text5.Text = Empty Text6.Text = Empty Text7.Text = Empty Timer1.Interval = 1000 Open "d:\并行存储.txt" For Random As 1 Len = 10 zhan = 2 t12 = 0 Timer1.Enabled = False End Sub
Private Sub Timer1_Timer() Static xinfen(12) '定义前一刻被选择兴奋的记忆柱群 Static amount '前一刻被选择兴奋的记忆柱群数 Static dong Static m11 Static n11 Static xvalue Static zhu(12) Static zhuamount Static zhutimesign Static timesign '时间标志 Static sign1 '记录标志 Static xinfen2 Static xinfen21(6) timesign1 = timesign timesign = Date + Time If sign1 = 0 Then n = 0 m = 0 sign1 = 1 End If sign = sign1 '刺激的输入 Dim xinfen1(4) Dim input1 Dim transportsign(6) '选择输入的text,并获取它的值 input1 = Text5.Text Select Case input1 Case 1111 input2 = Text2.Text Case 2222 input2 = Text3.Text Case 3333 input2 = Text4.Text Case Else input2 = Text1.Text End Select Select Case xinfen2 Case 1111 xinfen2 = 2222 Case 2222 xinfen2 = 3333 Case 3333 xinfen2 = 1231 Case Else xinfen2 = 1111 End Select Text7.Text = input2
inputvalue = 24 '刺激对记忆柱的兴奋能力为8 For t = 1 To 6 transportsign(t) = Mid(input2, t, 1) If t < 5 Then xinfen1(t) = (t - 1) * 3 + transportsign(t) For t1 = 1 To 2 Get 1, 48 * 400 + 60 * (xinfen1(t) - 1) + 48 + t1, jcrn Get 1, jcrn, jcValue1 Get 1, jcrn + 48, time1 jcValue1 = jcValue1 - ((timesign - time1) / 86400) * 60 * 10 / 2 '遗忘 If jcValue1 < 0 Then jcValue1 = 0 End If inputvalue1 = jcValue1 * (-t1 * 2 + 3) inputvalue = inputvalue + inputvalue1 Next t1 End If If t = 5 Then transportjc = transportjc + transportsign(t) * 100 End If If t = 6 Then transportjc = transportjc - transportsign(t) * 100 End If Next t
'计算被选择兴奋的记忆柱的动力 For t = 1 To amount For t1 = 1 To 2 Get 1, 48 * 400 + 60 * (xinfen(t) - 1) + 48 + t1, jcrn Get 1, jcrn, jcValue1 Get 1, jcrn + 48, time1 jcValue1 = jcValue1 - ((timesign - time1) / 86400) * 60 * 10 / 2 '遗忘 If jcValue1 < 0 Then jcValue1 = 0 End If jcvalue = jcvalue + jcValue1 * (-t1 * 2 + 3) Next t1 Next t
'目的完成后奖惩记忆 If xinfen1(1) = zhu(1) And xinfen1(2) = zhu(2) And xinfen1(3) = zhu(3) And xinfen1(4) = zhu(4) Then m11 = 0 n11 = n11 + 1 If n11 > 5 Then n11 = 5 End If For t1 = 1 To 8 Get 1, t1 + 24000 + (sign - 1) * 100, valuesign For t2 = 1 To 4 Get 1, 400 * 48 + (valuesign - 1) * 60 + 48 + t2, jcrn Get 1, jcrn, Value Get 1, jcrn + 48, time1 Value = Value - ((timesign - time1) / 86400) * 60 * 10 / 2 If Value < 0 Then Value = 0 End If Put 1, jcrn + 48, timesign If transportjc > 0 Then Value = transportjc / 4 - 1 / (Value + 1) Get 1, 400 * 48 + (valuesign - 1) * 60 + 48 + t2, jcrn1 Get 1, jcrn1, Value1 Get 1, jcrn1 + 48, time1 Value1 = (Value1 - ((timesign - time1) / 86400) * 60 * 10 / 2) / 2 If Value1 < 0 Then Value1 = 0 End If Put 1, jcrn1 + 48, timesign Put 1, jcrn1, Value1 If t2 = 4 Or t2 = 2 Then GoTo 6 End If If transportjc = 0 Then Value = (dong + n11 * Value) / 5 - 1 / (Value + 1) If t2 = 3 Or t2 = 1 Then GoTo 6 End If If transportjc < 0 Then Value = -transportjc / 4 - 1 / (Value + 1) If t2 = 3 Or t2 = 1 Then GoTo 6 End If Put 1, jcrn, Value 6 Next t2 Next t1
Else
If transportjc = 100 Or transportjc = -100 Or transportjc = 0 And xinfen(1) > 0 Then n11 = 0 m11 = m11 + 1 If m11 > 5 Then m11 = 5 End If '奖惩发生后或目的没有完成的记忆
For t1 = 1 To 8 Get 1, t1 + 24000 + (sign - 1) * 100, valuesign For t2 = 1 To 4 Get 1, 400 * 48 + (valuesign - 1) * 60 + 48 + t2, jcrn Get 1, jcrn, Value Get 1, jcrn + 48, time1 Value = Value - ((timesign - time1) / 86400) * 60 * 10 / 2 '遗忘 If Value < 0 Then Value = 0 End If Put 1, jcrn + 48, timesign If transportjc > 0 Then Value = transportjc / 4 - 1 / (Value + 1) Get 1, 400 * 48 + (valuesign - 1) * 60 + 48 + t2, jcrn1 Get 1, jcrn1, Value1 Get 1, jcrn1 + 48, time1 Value1 = (Value1 - ((timesign - time1) / 86400) * 60 * 10 / 2) / 2 If Value1 < 0 Then Value1 = 0 End If Put 1, jcrn1 + 48, timesign Put 1, jcrn1, Value1 If t2 = 4 Or t2 = 2 Then GoTo 8 End If If transportjc = 0 Then Value = ((dong + m11 * Value) / 5 - 1 / (Value + 1)) If t2 = 3 Or t2 = 1 Then GoTo 8 End If
If transportjc < 0 Then Value = -transportjc / 4 - 1 / (Value + 1) If t2 = 3 Or t2 = 1 Then GoTo 8 End If Put 1, jcrn, Value 8 Next t2 Next t1 End If End If
'主注意目的对象的动力变化 For t = 1 To amount For t1 = 1 To 2 Get 1, 48 * 400 + 60 * (zhu(t) - 1) + 48 + t1, jcrn Get 1, jcrn, jcValue1 Get 1, jcrn + 48, time1 jcValue1 = jcValue1 - ((timesign - time1) / 86400) * 60 * 10 / 2 '遗忘 If jcValue1 < 0 Then jcValue1 = 0 End If dong1 = dong1 + jcValue1 * (-t1 * 2 + 3) Next t1 Next t dong = dong1 dong = dong - dong * 0.1 '主注意目的对象的动力
'动力比较 '文本框输入的动力比较 If inputvalue > dong And inputvalue >= jcvalue Or dong = 0 Then dong = inputvalue dongsign = dong zhuamount = 4 zhutimesign = timesign For t = 1 To 4 xinfen(t) = xinfen1(t) zhu(t) = xinfen1(t) Next t GoTo 10 End If '被选择兴奋的动力比较 If dong < jcvalue And jcvalue > inputvalue Then dong = jcvalue dongsign = dong zhuamount = amount zhutimesign = timesign For t = 1 To 4 zhu(t) = xinfen(t) Next t GoTo 10 End If If dong >= jcvalue And dong >= inputvalue Then GoTo 90 End If
'主注意目的对象之间的兴奋记忆 10 For t = 1 To 4 zhanamount = zhanamount + 1 Put 1, 24000 + (sign1 - 1) * 100 + zhanamount, zhu(t) '在24000展示框中记下兴奋的记忆柱 allvalue = 6 For t1 = 1 To 4 '记忆柱的被兴奋能力 If t1 = t Then GoTo 5 Get 1, (zhu(t) - 1) * 400 + zhu(t1), Value Get 1, (zhu(t) - 1) * 400 + zhu(t1) + 95, time1 Value = Value - ((timesign - time1) / 86400) * 60 * 10 / 2 '遗忘 If Value < 0 Then Value = 0 End If Put 1, (zhu(t) - 1) * 400 + zhu(t1) + 95, timesign allvalue = allvalue + Value 5 Next t1 For t1 = 1 To 4 If t1 = t Then GoTo 9 Get 1, (zhu(t) - 1) * 400 + zhu(t1), Value Value = allvalue / 4 - 1 / (Value + 1) '兴奋的记忆 If Value < 0 Then Value = 0 End If Put 1, (zhu(t) - 1) * 400 + zhu(t1), Value 9 Next t1 Next t ' '主注意目的对象所易化的且与奖惩中枢建立了一定联系的记忆柱,并记录在23100到23200之间 If zhutimesign = timesign Then For t = 1 To zhuamount '兴奋得到主注意目的对象所易化的记忆柱,易兴奋的 For t1 = 1 To 47 Get 1, 190 + t1 + (zhu(t) - 1) * 400, zoutput Get 1, zoutput, Value Get 1, zoutput + 95, time3 Value = Value - ((timesign - time3) / 86400) * 60 * 10 / 2 If Value < 0 Then Value = 0 End If jz = (zoutput \ 400) * 400 Get 1, 386 + jz, time4 If time4 = timesign Then '说明被易化过 Get 1, 386 + jz - 1, avalue avalue = Value + avalue Put 1, 386 + jz - 1, avalue Get 1, 387 + jz, time3 If avalue > 4 And time3 < timesign Then Get 1, 23000, yxtime Put 1, 387 + jz, timesign If yxtime = timesign Then Get 1, 23000 + 1, yxamount Put 1, 23000 + yxamount + 2, jz / 400 + 1 yxamount = yxamount + 1 Put 1, 23000 + 1, yxamount Else: Put 1, 23000, timesign amount2 = 1 Put 1, 23000 + 1, amount2 Put 1, 23000 + 1 + 1, jz / 400 + 1 End If End If Else '没被易化过的情况 Put 1, 386 - 1 + jz, Value Put 1, 386 + jz, timesign End If Next t1 Next t ' For t = 1 To zhuamount '兴奋得到主注意目的对象所易化的记忆柱,抑制的 For t1 = 1 To 48 Get 1, 48 * 400 + (zhu(t) - 1) * 60 + t1, zoutput Get 1, zoutput, Value Get 1, zoutput + 95, time3 Value = Value - ((timesign - time3) / 86400) * 60 * 10 / 2 If Value < 0 Then Value = 0 End If jz = (zoutput \ 400) * 400 Get 1, 386 + jz, time4 If time4 = timesign Then Get 1, 386 + jz - 1, avalue Get 1, 387 + jz, time3 avalue = Value + avalue Put 1, 386 + jz - 1, avalue If avalue >= 4 And time3 < timesign Then Put 1, 387 + jz, timesign Get 1, 23000, yxtime If yxtime = timesign Then Get 1, 23000 + 1, yxamount Put 1, 23000 + yxamount + 2, jz / 400 + 1 yxamount = yxamount + 1 Else: Put 1, 23000, timesign Put 1, 23000 + 1, zhan - 1 Put 1, 23000 + 1 + 1, jz / 400 + 1 End If End If Else Put 1, 386 - 1 + jz, Value Put 1, 386 + jz, timesign End If Next t1 Next t '与奖惩联系达到一定强度后记录下来,直接记在383 Get 1, 23000, time1 If time1 = timesign Then Get 1, 23000 + 1, amount For t = 1 To amount Get 1, 23000 + 1 + t, nozha Put 1, (nozha - 1) * 400 + 387, timesign - 1 Get 1, 48 * 400 + (nozha - 1) * 60 + 48 + 3, jrn Get 1, jrn, jvalue Get 1, jrn + 48, jtime Get 1, 48 * 400 + (nozha - 1) * 60 + 48 + 4, crn Get 1, crn, cvalue Get 1, crn + 48, ctime jvalue = jvalue - ((timesign - jtime) / 86400) * 60 * 10 / 2 If jcvalue < 0 Then jcvalue = 0 End If cvalue = cvalue - ((timesign - ctime) / 86400) * 60 * 10 / 2 If caValue < 0 Then caValue = 0 End If jcvalue = jvalue - cvalue If jcvalue > 3 Or jcvalue < -3 Then Put 1, (nozha - 1) * 400 + 383, jcvalue Put 1, (nozha - 1) * 400 + 384, timesign End If Next t End If End If
For t = 1 To 48 Put 1, 400 * (t - 1) + 386, timesign - 1 Next t ' '随机易化的记忆柱的易化计算 90 inputxinfen2 = 3 '易化的值 For t = 1 To 4 transportsign(t) = Mid(xinfen2, t, 1) xinfen21(t) = (t - 1) * 3 + transportsign(t) + 36 Get 1, 400 * (xinfen21(t) - 1) + 386, xinfen21time If xinfen21time = timesign Then Get 1, 400 * (xinfen21(t) - 1) + 385, xinfen21value xinfen21value = xinfen21value + 8 Put 1, 400 * (xinfen21(t) - 1) + 385, xinfen21value Else Put 1, 400 * (xinfen21(t) - 1) + 385, inputxinfen2 Put 1, 400 * (xinfen21(t) - 1) + 386, timesign End If Next t
'抑制时兴奋的记忆柱的易化 For t = 1 To 4 For t1 = 1 To 48 Get 1, 48 * 400 + t1 + (xinfen(t) - 1) * 60, zoutput Get 1, zoutput, Value Get 1, zoutput + 95, time3 rninput = zoutput Value = 0.5 + Value - ((timesign - time3) / 86400) * 60 * 10 / 2 If Value < 0 Then Value = 0 End If jz = (zoutput \ 400) * 400 Get 1, jz + 382, time3 If time3 = timesign Then Get 1, jz + 381, rnamount Put 1, jz + 237 + rnamount + 1, rninput Put 1, jz + 381, rnamount + 1 Get 1, jz + 385, allvalue Get 1, jz + 384, jctime If jctime = zhutimesign Then Get 1, jz + 383, jcvalue Else: jcvalue = 0 End If zhallvalue = allvalue allvalue = allvalue + Value '如果就应在展示框中记下 23100 Get 1, 387 + jz, time3 If allvalue + jcvalue >= 3 And time3 < timesign Then Get 1, 23101, yhtime Put 1, 387 + jz, timesign If yhtime = timesign Then Get 1, 23100, yhamount Put 1, 23100 + 1 + yhamount + 1, jz / 400 + 1 Put 1, 23100, yhamount + 1 Else: Put 1, 23101, timesign Put 1, 23100, t12 \ 100 + 1 Put 1, 23100 + 1 + 1, jz / 400 + 1 End If End If ' Put 1, jz + 385, allvalue Else Put 1, jz + 381, rnamount * 0 + 1 Put 1, jz + 382, timesign Put 1, jz + 237 + 1, rninput Get 1, jz + 386, timesign1 If timesign1 < timesign Then Put 1, jz + 385, Value Put 1, jz + 386, timesign Else Get 1, jz + 385, alvalue alvalue = alvalue + Value Put 1, jz + 385, alvalue End If End If Next t1 Next t
'选择出易兴奋的 Get 1, 23100, allamount '得出被兴奋的记忆柱的数目 Dim amount1(16) Dim x(16, 3) Dim valuex(16, 3) For t = 1 To allamount Get 1, 23101 + t, zho Get 1, (zho - 1) * 400 + 385, allvalue '奖惩的动力 jz = (zho - 1) * 400 Get 1, jz + 384, rnzhutime If zhutimesign = rnzhutime Then Get 1, jz + 383, jcvalue allvalue = jcvalue + allvalue End If If zho / 3 = (zho \ 3) Then n = (zho \ 3) Else: n = (zho \ 3) + 1 End If '计算出zho为那一反应小区 'amount(n)为第n个反应小区所兴奋的基本记忆柱数 amount1(n) = amount1(n) + 1 Select Case amount1(n) Case 2 If valuex(n, 1) > allvalue Then valuex(n, 2) = allvalue x(n, 2) = zho Else: x(n, 2) = x(n, 1) valuex(n, 2) = valuex(n, 1) valuex(n, 1) = allvalue x(n, 1) = zho End If Case 3 If x(n, 1) < allvalue Then x(n, 3) = x(n, 2) valuex(n, 3) = valuex(n, 2) x(n, 2) = x(n, 1) valuex(n, 2) = valuex(n, 1) x(n, 1) = zho valuex(n, 1) = allvalue Else If x(n, 2) > allvalue Then x(n, 3) = zho valuex(n, 3) = allvalue Else: x(n, 3) = x(n, 2) valuex(n, 3) = valuex(n, 2) x(n, 2) = zho valuex(n, 2) = allvalue End If
End If Case 1 x(n, 1) = zho valuex(n, 1) = allvalue End Select Next t
'在各个中枢按一定标准选出易兴奋的原始记忆柱群,t代表中枢, 't2代表反应区,t3代表反应区中第几个记忆柱(按兴奋能力排) '先选择第一区,然后选择第二区 Dim x1(4, 4) Dim valuex1(4, 4) For t = 1 To 4 n1 = 4 * (t - 1) + 1 For t2 = 1 To amount1(n1) '选择一中枢的第一反应区 x1(t, 1) = x(n1, t2) valuex1(t, 1) = valuex(n1, t2) For t11 = 1 To amount1(n1 + 1) '第二最小反应区 x1(t, 2) = x(n1 + 1, t11) valuex1(t, 2) = valuex(n1 + 1, t11) Get 1, (x(n1 + 1, t11) - 1) * 400 + x(n1, t2), Value Get 1, (x(n1 + 1, t11) - 1) * 400 + x(n1, t2) + 95, time1 Value1 = (Value - ((timesign - time1) / 86400) * 60 * 10 / 2) If Value1 < 1 Then GoTo 11 For t12 = 1 To amount1(n1 + 2) '第三最小反应区 x1(t, 3) = x(n1 + 2, t12) valuex1(t, 3) = valuex(n1 + 2, t12) Get 1, (x(n1 + 2, t12) - 1) * 400 + x(n1, t2), Value Get 1, (x(n1 + 2, t12) - 1) * 400 + x(n1, t2) + 95, time1 value12 = (Value - ((timesign - time1) / 86400) * 60 * 10 / 2) Get 1, (x(n1 + 2, t12) - 1) * 400 + x(n1 + 1, t11), Value Get 1, (x(n1 + 2, t12) - 1) * 400 + x(n1 + 1, t11) + 95, time1 value2 = (Value - ((timesign - time1) / 86400) * 60 * 10 / 2) If value12 >= 1 And value2 >= 1 Then Else: GoTo 12 End If For t13 = 1 To amount1(n1 + 3) '第四最小反应区 x1(t, 4) = x(n1 + 3, t13) valuex1(t, 4) = valuex(n1 + 3, t13) For t5 = 1 To 3 Select Case t5 Case 1 l = t2 Case 2 l = t11 Case 3 l = t12 End Select Get 1, (x(n1 + 3, t13) - 1) * 400 + x(n1 + t5 - 1, l), Value Get 1, (x(n1 + 3, t13) - 1) * 400 + x(n1 + t5 - 1, l) + 95, time1 value13 = (Value - ((timesign - time1) / 86400) * 60 * 10 / 2) If value13 < 1 Then GoTo 13 Next t5 13 If t5 = 4 Then GoTo 3 Else: x1(t, 4) = 0 End If Next t13 12 Next t12 11 Next t11 2 Next t2 3 Next t
'从这些原始记忆柱群中选出最易兴奋的做为主注意对象 Dim x2(4) Dim yoxinfen(40) yoamount = 0 For t = 1 To 4 For t1 = 1 To 4 If x1(t, t1) = 0 Then x2(t) = 0 GoTo 23 End If x2(t) = x2(t) + valuex1(t, t1) Next t1 If v < x2(t) Then v = x2(t) m = t End If 23 Next t amount = 4 For t1 = 1 To 4 If t1 = m Then For t = 1 To 4 xinfen(t) = x1(m, t) Next t Else End If Next t1
If v < 12 Then For t = 1 To 4 xinfen(t) = xinfen21(t) Next t End If
'选择出来的记忆柱的记忆 For t = 1 To 4 Put 1, 24000 + (sign1 - 1) * 100 + 4 + t, xinfen(t) If xinfen(1) > 36 Then If (xinfen(t) - 36) / 3 = (xinfen(t) - 36) \ 3 Then text51 = text51 + (3 + (xinfen(t) - 36) Mod 3) * 10 ^ (t - 1) Else text51 = text51 + ((xinfen(t) - 36) Mod 3) * 10 ^ (t - 1) End If End If Get 1, (xinfen(t) - 1) * 400 + 381, rnamount Get 1, (xinfen(t) - 1) * 400 + 385, allvalue For t1 = 1 To rnamount Get 1, (xinfen(t) - 1) * 400 + 237 + t1, rn Get 1, (xinfen(t) - 1) * 400 + rn, Value Get 1, (xinfen(t) - 1) * 400 + rn + 95, time3 Value = (Value + allvalue / 3) / 2 If Value < 0 Then Value = 0 End If Put 1, (xinfen(t) - 1) * 400 + rn, Value Put 1, (xinfen(t) - 1) * 400 + rn + 95, timesign Next t1 Next t
Text5.Text = text51 Text6.Text = zhu(1) & ":" & zhu(2) & ":" & zhu(3) & ":" & zhu(4) For t = 1 To 4 allvalue = 6 For t1 = 1 To 4 '记忆柱的被兴奋能力 If t1 = t Then GoTo 35 Get 1, (xinfen(t) - 1) * 400 + xinfen(t1), Value Get 1, (xinfen(t) - 1) * 400 + xinfen(t1) + 95, time1 Value = Value - ((timesign - time1) / 86400) * 60 * 10 / 2 '遗忘 If Value < 0 Then Value = 0 End If Put 1, (xinfen(t) - 1) * 400 + xinfen(t1) + 95, timesign allvalue = allvalue + Value 35 Next t1 For t1 = 1 To 4 If t1 = t Then GoTo 39 Get 1, (xinfen(t) - 1) * 400 + xinfen(t1), Value Value = allvalue / 4 - 1 / (Value + 1) '兴奋的记忆 If Value < 0 Then Value = 0 End If Put 1, (xinfen(t) - 1) * 400 + xinfen(t1), Value 39 Next t1 Next t End Sub |
|