其中 canget(State1) 表示從狀態 State1 開始,猴子是否能達到 has 狀態(即擁有香蕉)。
好各位观众
Hello, everybody.
今天我们要来探讨一个新的主题
Today we are going to explore a new theme
叫做用AI程式模拟猴子的思考方式
It's called simulating monkey thinking with an AI program.
我们现在一个情况就是说
We have a situation now that says
我们要判断
We have to judge
就是猴子他的行为到底是自主的
The monkey is actually acting autonomously.
还是他内部有层次
Or is there a layer within him?
哈他们
Ha them
他遇到了各种情况
He encountered various situations
他下一步要做什么
What is he going to do next?
他是不是内部有城市在操控呢
Does he have a city in control?
这就是我们有人说的所谓的命运
That's what some of us call destiny.
命运哈什么
Destiny what
就是说人的一生
That is to say, one's life
他所作所为
What he did
都是他里面的层次所操控的
It's all controlled by the layers within him
我们来就这个问题
Let's talk about this.
我们来做一个简单的呃证明哈
Let's make a simple, uh, proof.
猴你看这一张图片
Monkey, look at this picture
猴子站在门的旁边
The monkey is standing by the door
在窗户的旁边有一个桌子
There is a table by the window
然后在这个房
Then in this room
在这个房间的中间吊着一个香蕉
In the middle of the room hangs a banana
一根香蕉
A banana
猴子现在肚子很饿
The monkey is very hungry now
在肚子饿的驱动下
Driven by hunger
他在这房间里面
He's in this room.
他站着是抓不到香蕉的
He can't catch a banana standing up.
他必须要移动桌子
He has to move the table.
移移移移到移到房间的中间
Move to move to the middle of the room
然后爬上桌子
Then climb onto the table
就可以获得香蕉
You can get bananas.
来吃香蕉了
Let's eat bananas
好
OK
猴子为什么会有这些这些动作呢
Why do monkeys do these things?
好
OK
我们现在所看到的预设情况就是
So here's the default that we see.
猴子在门口
Monkey at the door
猴子在地板上
Monkey on the floor
好猴子在门口
Good monkey at the door
就是说他的横坐标s坐标
That is to say, his abscissa's coordinates
是在门口这个位置
It's at the door.
猴子在地板上
Monkey on the floor
就是他的纵坐标y
It's his vertical coordinate y.
哈是在0 哈
Ha is at 0 ha
现在y等于0
Now y is equal to 0.
也是在地板上
Also on the floor
然后另外一个物件是桌子
And then the other object is the table.
桌子在窗户的旁边
The table is by the window
然后这个时候
Then this time
猴子是没有办法吃到香蕉的
Monkeys can't eat bananas
对不对
Right?
好我们来分析这个
Okay, let's analyze this
就是这几种状况啊
Are these the situations?
就是一二三四
It's one, two, three, four.
一二三四哈
One two three four ha
这四种状况呢
What about these four situations?
我们要用城市要怎么样表达
How are we going to express it in cities?
然后呢
And?
我们就可以由
We can
城市自己去执行
Cities do it themselves.
然后
And then...
城市就会自动的让猴子去抓到香蕉
The city will automatically ask the monkey to catch the banana
这可是很神奇的对不对
It's amazing, isn't it?
好
OK
在研究这个这个命题之前呢
What about before studying this proposition?
我们先了解
Let's first understand
就是说我们如何把这几个
That is to say, how do we put these
这几这四个情况呢写成城市呢
How about writing these four situations as cities?
我们要表达他的概念
We want to express his concept
要该怎么表达
How to express
我们用了一个城市的概念叫做状态
We used a concept of cities called states.
哈
Ah!
从一个状态到另外一个状态
From one state to another
好我们现在先这样写状态
Okay, let's write the status like this now
英文状态叫stay
The English status is called stay.
S T a T ST啊
ST里面有各种状态哈
There are various states in ST.
我们现在就说我们希望这
We shall now say that we hope this
我们这个猴子的目标
The target of our monkey
是要获得这根香蕉嘛
Do you want to get this banana?
对不对
Right?
猴子为了要获得这根香蕉
The monkey wants to get this banana
我们画一下图啊
Can we draw a diagram?
我们现在的目标是这根香蕉
Our current goal is this banana
猴子现在目标是这根相加
The monkey is now aiming for this addition
所以我们如何在城市里面
So how do we get inside the city?
表达一个状态概念呢
Express a concept of state
我们就是说猴子的横横坐标h坐标
So what we're saying is the monkey's abscissa, the h-coordinate.
我们暂时先不要理他
Let's ignore him for now
猴子的纵坐标y也不要理他
The monkey's vertical axis y also ignores him
啊
Ah!
就是还有这个窗户不
Is there still this window?
这个桌子在什么地方
Where is this table located?
我们暂时不要理他
Let's ignore him for now
我们的目标就是最后一个
Our goal is to be the last one.
我给他取名叫海市就是说
I named him Haishi, which means
猴子呢获得了这个
What about the monkey?
已经已经获得了这个香蕉哈
I have already got this banana.
我们给他一个变数叫做has哈
We give him a variable called has ha
我们只在我们的目标
We are only at our goal
是要写成这个状态模式
Is to write this state mode
这个这样状态模式呢
What about this state mode?
我们把它图解一下啊
Shall we illustrate it?
他就是这个意思
That's what he meant
把它放中间
Put it in the middle
哦好
Oh yeah.
我把它用线来拉一拉
I'm going to pull this with a string.
就是它总共有四种状态嘛
That is, it has a total of four states.
依据前面四种状态啊
According to the previous four states?
一个
one
我先把线画好
I'll draw the line first
两个
two
嗯
OK
归途嘛
Way home
哎哟插入才重要
Ouch, the insertion is important.
插入
insert
画这条线
Draw this line
然后再画两条
Then draw two more
线
line
再画一条线就好了
Just draw another line.
我们总共有4种状态
We have a total of 4 states.
好
OK
第一种状态是什么
What is the first state?
就是就是说这猴子是在门口
That means the monkey is at the door
我们给他一个英文符号
We give him an English symbol.
叫做at door
Called at door
啊
Ah!
这个变数为代表
This variable represents
哈
Ah!
然后第二个状态呢
What about the second state?
是他的中坐标
Is his median coordinate
猴子在地板上
Monkey on the floor
我们就给他叫做on floor
We'll call him on floor
在地板上
On the floor
啊
Ah!
low
对不对
Right?
在地板上
On the floor
近一点嗯
A little closer
好
OK
第三个状态是什么
What is the third state?
第三个状态是说桌子在窗户的旁边
The third condition is that the table is next to the window
啊
Ah!
我们重点是
Our focus is
那个窗在哪里位置呢
Where is that window located?
我们假设这个
We assume this
哦我们已经给他了
Oh, we already gave it to him.
这个地方
This place.
我们给他叫做窗户旁边
We called him by the window.
我觉得at window好了
I think at window
桌子在窗户的旁边
The table is by the window
然后最后一个状态是猴子
And then the last state is the monkey.
没有猴子
No monkeys.
怎样没有香蕉啊
How come there are no bananas?
这个时候猴子是不可能会有香蕉的嘛
At this time, it is impossible for the monkey to have bananas
对不对我们给他一个变数叫做
Right? We give him a variable called
as
好
OK
这4种状态我们都标出来了哈
We have marked all these 4 states.
就是说哦
Just say oh
就是这个stay啊
Is this the stay?
画好
Draw
就是这个时间有这四种状态就对了
It is right to have these four states at this time
我们的目标是要让猴子has
Our goal is to make the monkey has
就是有香蕉
Just bananas
现在是猴子在门旁边
Now the monkey is by the door
猴子在地板上吼
Monkey roars on the floor
桌子在窗户旁边
The table is by the window.
猴子当然是没有香蕉了哈
Of course, monkeys don't have bananas anymore.
目前的状态是这样子对不对
The current state is like this, right?
好我们呢
Okay. What about us?
首先我们要我们的层次呢
First of all, we need our hierarchy.
我们要加一个动作的层次
We're going to add an action level.
他有几种动作呢
How many moves does he have?
就是猴子可以推这个桌子
The monkey can push the table
猴子可以爬上这个桌子
Monkeys can climb on this table
猴子可以抓这个香蕉
The monkey can grab this banana
好大概是目前发现是三个动作
Okay, probably three moves have been found so far.
好我们这个动作
Okay, here we go.
我们用木斧去表示他的这个动作呢
We use a wooden axe to represent this movement of his
总共有三种啊用木斧
There are three kinds in total, with wooden axes
木斧里面我们有stay one
We have a stay one
day one
状态一
state one
然后呢
And?
我们给他一个动作
We give him a move.
看他是推桌子
Watch him push the table
还是还是爬桌子
Still climbing the table
还是抓香蕉
Or catch a banana?
这三个动作
These three actions
一个stay one的状态就会变成stay
The state of staying one becomes staying
stay to
的状态
state
对不对
Right?
然后我们设定好了它的状态
Then we set its state
情况是这样
So here's the situation.
好那么我们要下一步
OK, so we're going to the next step
就是说我们先写一个陈式
That is to say, let's write a Chen style first
就是说猴子抓香蕉这个动作
That is to say, the action of the monkey grabbing a banana
他的状态变化是怎么样呢
What is his state change?
好
OK
我们猴子抓香蕉呢
We monkeys catch bananas
第一个状态是什么
What is the first state?
也是木斧嘛
It's also a wooden axe
哈
Ah!
木斧
wooden axe
就是他的状态是从stay
Is that his state is from staying
我刚才说的是从啊
What I just said is from?
这边stay one m stay two
利用利用这个格式去写他的状态
Use this format to write his status
啊
Ah!
stay one就是什么
Stay one is what
现在状态就是stay one
The current state is to stay one
stay就是初始状态
Stay in the initial state
就是
That is.
嗯
OK
如果猴子呢
What about monkeys?
要抓到这个猴子
To catch this monkey
要猴子要抓到这个香蕉
If you want the monkey to catch this banana
首先猴子必须在房间的中间
First the monkey has to be in the middle of the room
因为香蕉是悬挂在房间的中间
Because the banana is hanging in the middle of the room
所以它这个状态一
So it is in this state one.
stay one的第一个状态是什么
What is the first state of staying one?
Mido我就取名叫Mido
Mido my name is Mido
mi I d d哎
I d d
你的就是房间的中间的意思
Yours means the middle of the room.
他的位置横坐标在中间
His position is abscissa in the middle
好
OK
他的正坐标是按
His positive coordinates are
table好了
Table is ready
在桌上按table
On the table press the table
我们先用一个box来表示
Let's start with a box
就说他直接说他在一个一个盒子上
Just say he directly said he was on one box at a time
或箱子上
Or on the box
都可以啊
Can you do it?
这样比较快
It's faster this way
on box on table
on box都可以
On the box
然后呢下一个就是
And then the next one is
现在呢猴子如果要抓到香蕉的话
Now, if the monkey wants to catch the banana
那这个桌子要移过来呀
Then this table needs to be moved over.
这个这个盒子
This box
这个桌子就是一个盒子
This table is a box.
盒子要移过来呀
The box is moving over.
箱子呀盒子移过来
Box, move the box
所以呢Unbox呢
So what about Unboxing?
对
Right
坐标也必须要middle
The coordinates must also be in the middle
对不对
Right?
是在中间吗
Is it in the middle?
才会抓到
Will catch
还会抓到香蕉
They catch bananas.
好猴子在还没有抓到香蕉之前
Good monkey before catching the banana
猴子必须要预备动作
The monkey must be ready for action
就是把桌子推过来
Just push the table over
猴子爬上桌子
The monkey climbed onto the table
然后猴子去抓香蕉
Then the monkey goes to catch the banana
对不对好
Right? Okay.
我们就把它写成stay one
We'll write it as stay one
已经写完了
It's finished.
我们要stay two的话
If we stay two
就是它的动作
That's what it does.
动作我们称它叫
Action we call it
Gras就是抓的意思啊
Gras means catch.
抓的Gras
Caught Gras
那关键词的下一个状态stay
The next state of the keyword stay
好
OK
他的转变成什么状态呢
What state is his transformation into?
就是他现在已经在中间了Mido
It's him who's in the middle now Mido
猴子在中间的
Monkey in the middle
猴子当然是在桌子上onbox
Of course the monkey is onboxed on the table
然后呢
And?
又在Mido
Mido again
那个桌子
That table
必须在房间的中间
It must be in the middle of the room
这个时候猴子就可以获得香蕉了
At this time, the monkey can get the banana.
因为他去抓他了嘛
Because he went to catch him
开始
start
他的状态变成这样了开始
His state became like this. Start
所以呢他的状态是这样子的变化
So his state changed like this
好
OK
我们写完第一行的城市的那个概念哈
We wrote the concept of the city in the first line.
我们把它缩小一下
Let's zoom it out.
多想段落
Think more
好把缩小比较整齐
Okay, shrink it neatly.
好我们这个概念已经写完了
Okay, we're done with this concept.
我们现在继续写
We continue to write now
好现在就是要写猴子呢
Okay, now I'm going to write about monkeys
推动那个桌子哈
Push that table
推来推去
Push around
或者说猴子在地板上走来走去
Or monkeys walking around on the floor
他的概念要怎么写呢
How should I write his concept?
就是move
Is move
啊他的下一个动作
Ah, his next move
move就是stay
To move is to stay
好
OK
ST什么东西呢
What is ST?
ST p one
s在某个坐标
S is at a certain coordinate
横坐标p one
Abscissa p one
然后它的纵坐标是在地板上嘛
Then its vertical axis is on the floor
所以是on flow
So it's on flow
在地板上
On the floor
on flow p one
到某个地方
To somewhere
我们称它叫做b
We call it b.
好了b
Ok b
然后呢
And?
到在这个地方有没有抓到香蕉
Did you catch any bananas in this place?
目前不得而知
Currently unknown
因为我还没有
Because I haven't
我们还没有把桌子移过去啊
We haven't moved the table over yet.
我随便选一
I'll choose any one.
个变数h不得而知
The variable h is unknown
但是我们知道就是说他会走路过去
But what we do know is that he will walk there.
所以这时候的动作WLK walk
So the action at this time is WLK walk
就是推动桌子从p one
Is to push the table from p one
到
to
work
从p one到p two
然后stay
And stay
当他直当他走动了
When he was straight, when he was walking
把桌子推到中间的时候
When pushing the table to the middle
会有什么情况呢
What will happen?
这个时候
This time
也没有说强调他把桌子推到哪里
He didn't emphasize where he pushed the table.
他就是推来推去中
He's just pushing around.
推推到房间的任何一个坐标就对了
Just push to any coordinate in the room
假设这个坐标是p to嘛
Suppose this coordinate is p to
因为我们这边已经说
Because we have already said
从猴子从p万走到p兔
From monkey from p million to p rabbit
啊
Ah!
猴子从p万走到p兔
The monkey went from p million to p rabbit
那么现在状态就是p兔了
Then the current state is p rabbit.
p兔
P rabbit
然后他的中坐标还是on floor
And his median is still on floor
还是在地板上
Still on the floor
还没有爬爬高啊
I haven't climbed high yet.
还是目前还是在地板上
Still on the floor
他只是走来走去而已
He's just walking around.
然后后面
Then behind
至于那个桌子在哪里就不重要啦
It doesn't matter where the table is
这个时候有没有抓到香蕉呢
Did you catch a banana at this time?
也不重要啦
It doesn't matter
因为这个时候只是走来走去而已
Because this time it's just walking around
好我把
Ok I will
显示缩小一下
Show zoom out
好这时候城市就是变成这种状态啊
Okay, this is what cities are like at this time.
我们先把我们概念改成这种格式
We're going to try and format it this way.
好
OK
第二个状态已经写完了
The second status has been written.
我们刚才写了一个抓的动作Gras
We just wrote a grab action Gras
啊Gras是抓嘛
Ah, Gras is catching
现在也写完了
It's done now.
这个搬动桌子推来推去的动作
The act of moving the table and pushing it around
walk
啊推来推去啊
Ah, push around.
猴子把这桌子推来推去
And the monkeys were pushing this table around.
好
OK
我们来写下一个动作
Let's do the next move.
就是我刚才说的下一个动作是什么呢
That's what I just said what's the next action?
好下下一个动作就是抓
Okay, the next move is to grab
去抓那根香蕉了
Go grab that banana
抓了一根香蕉呢
Caught a banana
我们叫做
We call it
给他个名称叫做can
Give him the name can
and get
啊
Ah!
就是抓到会抓到那根香蕉它的状
If you catch it, you will catch that banana.
态
state
状态
state
我们这边上面已经有写了一个预设的
We have already written a preset on it.
就是这个
Here it is.
我们直接复制过来哈
Let's copy it directly.
复制这个状态就好
Just copy this state.
哦一次就复制3个
Oh, just copy 3 at a time.
我们还是一个一个写好了
We still write them one by one.
stay
好
OK
一个
one
两个三个
Two, three.
最后个我们的目标是要抓到香蕉
The last goal is to catch the bananas.
那么猴子就会有香蕉了
Then the monkey will have bananas
所以就是has
So it has
好
OK
这就是我们的目标
So that's the goal.
这个can get这个动作哈
This can get this action
但是can get这个动作
But can get this move
它的细步去分的话
If it is divided into small steps
七步区分的话
Seven steps to distinguish words
可以分解成什么呢
What can it be broken down into?
我写一下哈
I'll write it down.
天
God
get
可以分解成这
Can be broken down into this
我现在假设它是s one啊
I'm assuming it's one now.
它里面的状态是s one
The state inside it is s one.
然后这边的这边的意思是说
Then this side, this side means that
如果move
If you move
it s one
m s two
好了s two
Ok s two
s代表st
S is for st.
就是说我猴子呢
That means I'm a monkey
执行这个动作
Execute this action
m的动作
M action
从s one移到从s one状态变到s two状态
Move from s one to change from s one state to s two state
然后我们再循环回去
And we loop it back.
在这个时候变成s two状态了can
At this time, it can become s two state.
get
s two状态
S two states
好
OK
这是它的一个基本观念
That's one of the basic ideas.
就说从s one进执行的在m的动作
Let's say the action at m performed from s one
它会状态从s one变到s two
It changes state from's one to's two.
然后再从这个新的状态s two
Then from this new state s two
再循环回去
Loop it back.
再继续执行各种动作
Then continue to perform various actions
这种动作就是这两种哈
This kind of action is these two kinds.
一个是grapes
One is grapes
一个是walk的动作
One is walking
对不对好
Right? Okay.
那么下一步呢
So what's the next step?
我们快要写
We are about to write
我们快要把整个猴子的思考模式
We're about to put the whole monkey's way of thinking
全部写完了哈
It's all written
我们现在在整理一下猴子的
We're sorting out the monkey's now.
我们这样
We are like this
他的猴子的基本思考模式写完之后
He wrote his monkey model.
我们发现到说他是一个
We found out that he was a
个个都是各自独立的
Each is independent
就是所谓的平行
It's called parallelism.
在猴子的世界里面
In the world of monkeys
在这个猴子的世界里面是这样子的啊
Is that how it works in the monkey world?
我们先把写下来啊
Let's write it down first.
就是说嗯在
That is to say, um, in
这只
This one.
猴子的
Monkey's
世界
world
是长怎么样呢
How does it look?
在这只猴子的世界是他所有的城市
In this monkey's world is all his cities
就是木斧
The wooden axe
第一部
first part
木斧就是那个动作那几种嘛
Is the wooden axe that kind of action?
啊
Ah!
木斧对
Wooden axe pair
他现在状态是什么
What is his current state?
stay
现在状态是横坐标
The current state is abscissa
啊
Ah!
是说如果我要抓他的话
I mean if I'm going to catch him
哎这个好像之前前面已经定义
Hey, this seems to have been defined before.
我们就直接copy pass的
We just copied the pass
哦
Oh.
前面这个是怎么讲
What about the previous one?
他少了一个has
He has lost one
not现在我们写一个比较完整的
Not now we write a more complete one
前面那个是比较不完整的啊
The previous one is relatively incomplete.
我们应该这样写
We should write like this
ZNIDDLE middle
猴子在横坐标是在房间的中间
The monkey on the abscissa is in the middle of the room.
而且要在桌子上啊
And it needs to be on the table.
但是啊而且要在
But ah, and in
而且要而且桌子也要在房间的中间
And yes, and the table should be in the middle of the room.
middle
这种情况下
In this case
还没有执行抓的动作的时候
When the grabbing action has not been performed
猴子猴子是还没有获得香蕉的
Monkeys, monkeys haven't got bananas yet.
所以是snap加给snap
So snap is added to snap.
嗯状态好
Hmm, in good condition
我们经过直行的这个叫做grass的状态
We go straight through this state called grass
对grass的动作
Action on grass
grass就是抓的意思
Grass means to catch
然后就会到这个stay
Then I'll stay here
到了新的状态
To a new state
就是stay
Just stay
多少
How much?
stay mido啊
也是mido
Also mido
猴子现在在中间mido
The monkey is in the mido
那这个时候不一样了
It's different this time
猴子已经在桌子上了
The monkey is already on the table
on box啊
在桌子上了
It's on the table.
然后呢
And?
那个桌子也在房间的中间的水蜜豆
The table is also in the middle of the room
这时候
At this time
猴子有香蕉了
The monkey has bananas
就是has就变成这样
It has become like this
有香蕉了
There are bananas
好
OK
这个状态写完了
This status is finished.
然后我们再写下一个
And then we write the next one.
那我们再这样打一个句点
Let's put a period like this.
啊
Ah!
好下一个就是木下一
Okay, the next one is the next one
个还是木鼓的动作
It's still a wooden drum.
木鼓什么呢
What is the wooden drum?
木鼓stay
Wooden drum stay
状态
state
p好某个状态
P is in a certain state
这个猴子是在那个s
This monkey is in that s.
在房间的某个位置
Somewhere in the room
然后它的纵坐标是on floor
Then its vertical axis is on floor
原本是on floor
It was on floor
floor的话
The floor
那
that
这个桌子呢
What about this table?
桌子也会在房间的中间
The table will also be in the middle of the room
所以这边也是p啊
So it's also p here.
对不对
Right?
也会在房间的中间
Also in the middle of the room
你猴子推桌子
Your monkey pushes the table
猴子的这这个
This monkey
这个p不见得是在房间的中间
This p doesn't have to be in the middle of the room
这个p是说猴子推那个桌子啊
This p means that the monkey pushes that table.
猴子猴子推这个桌子
Monkey monkey push this table
房间里面怎么推
How to push in the room
我们都发现
We all found that
猴子的坐标
Monkey coordinates
跟桌子的坐标是同一个坐标
It's the same coordinates as the table
因为它推来推去都在同一个位置上
Because it's pushing around all in the same place.
所以这个时候这两个p
So at this time, these two p
所以这两个为什么p呢
So why are these two p?
这两个值必须相等
The two values must be equal
所以两个都是p
So both are p.
然后
And then...
至于它会不会获得相交
As to whether it will intersect
还不知道
Don't know yet
所以就h一个变数H2
So just h is a variable H2
然后我们要执行的他的爬的动作
Then we have to perform his crawling motion
这个是爬快
This is climbing fast.
我就直接称呼家教快爬
I will directly call the tutor to climb
达到什么状态呢stay
What state do you want to stay?
jp
然后这个时候爬上去
Then climb up at this time
某桌子就是猴子在某个坐标点
A table is a monkey at a certain coordinate point
我们爬上去
We climb up
爬到桌子上面
Climb to the table
所以Unbox
Unboxing
然后至于桌子现在在哪里
And as for where the table is now
或者是猴子有没有获得香蕉
Or did the monkey get the banana?
目前不重要
Not important now
因为他的动作是爬
Because what he's doing is he's crawling.
他只要强调他这个爬就可以爬
He can climb as long as he emphasizes his climbing
就是就是y的坐标在变换而已啊
It's just that the coordinates of y are changing.
所以由on floor
So on floor
由on floor变成了由on box这个动作而已
From on floor to on box
所以就是这个动作写完了
So that's it.
好
OK
我们现在我看看有没有写错
Let me see if there is any mistake now.
先检查一下好
Check it first
没有写错
Nothing wrong.
我们现在进入到铺起
We're now going into paving.
就就是说
That is to say
推动这个桌子
Push this table
猴子啊猴子
Monkey, monkey
把这桌子推来推去
Push this table around
这个动作啊
What's this action?
一定要有个谱曲的动作
There must be a compositional action
所以我们这个木从这个状态又是一样
So our wood is the same from this state.
ST AP对
ST AP
现在状态是什么呢
What is the current status?
谱曲这个观念
The idea of composition
就说坐标p one
Just say coordinate p one
在Onflow的时候
On Onflow
因为在Onflow才能够推来推去嘛
Because it can only be pushed around on Onflow.
对对在地板上才能推来推去
Yes, yes, you can only push around on the floor
那不管猴子怎么推
No matter how the monkey pushes
这两个坐标是必须要相等的
These two coordinates must be equal
所以这边也是p one
So this is also p one.
啊猴子在桌子上
Ah monkey on the table
桌子的位置
The position of the table
这两个坐标是一样的h
These two coordinates are the same h.
啊
Ah!
所以这个时候就等于push
So this time is equivalent to pushing
这个时候要写push EUSH
At this time, you need to write push EUSH.
push
这个这个名称是随便由我们定的哈
This name is randomly determined by us.
就是不许
Just not allowed
就是说从p one推到p two这个动作
That is to say, the action of pushing from p one to p two
p one位置推到p two这个动作
Push the p one position to p two
会改变状态
Will change state
会变成什么状态呢stay
What state will it stay in?
会变成p two的状态
Will become p two state
然后是在on floor
Then on floor
然后又会在p two
Then it will be at p two again.
h
好
OK
最后一个了
The last one.
就是一个叫做walk的猴子
It's a monkey called walking
走来走去的啊
You're walking around?
动作move
Move move
你是羡慕
You are envious
走来走去跟推来推去好像是差不多嘛
It seems that walking around and pushing around is similar
哈是有一点点不一样对
Ha, it's a little different, right?
走来走去
walking around
p one
on floor
走来走去也必须在地板上才能走嘛
You have to be on the floor to walk around
所以是on floor
So it's on floor
那至于那个
As for that
桌子
table
坐标我们不在乎
Coordinates we don't care
我们在乎是猴子走到哪里去
We care where the monkeys go.
所以我们不在乎
So we don't care.
我们就给他个变数b
We give him a variable b.
还有h
And h.
他们还没有抓到香蕉
They haven't caught the banana yet.
好
OK
我们现在下一个就是walk了
We're walking next now
这就是walk的动作
This is the walk
walk是从p one到p two对不对
The walk is from p one to p two, right?
好这
Ok this
个p one到p two之后
After p one to p two
它的状态就不一样啦
Its state is different.
stay
那状态会变成什么呢
What would that be?
p one到p to嘛
p onep toggle
虽然现在红指是到p to这个位置
Although the red finger is now at this position to p
on floor
在地板上推来推去啊
Pushing around on the floor?
中桌标志在on floor
Middle table sign on floor
好至于这个桌子在哪里呢不重要
Ok, well, where is this table, it doesn't matter.
好有没有抓到香蕉
Okay, did you catch the banana?
目前还没有呢
Not yet.
对不对然后我们城市
Right? Then our city
我们城市的概念大
The concept of our city is large
大概就转化成这样就够了
It's probably converted to this.
好
OK
这样子的状态
Such a state
我们这样总共几个
How many are we in total?
一二三四四个
One, two, three, four.
好
OK
1234 总共有四个动作
1234 There are four actions in total.
然后我们现在在城市里面
And now we're in the city.
就要问他问题
Ask him questions
说那这样子的四个动作会
Say that four actions like this will
猴子到底会不会这样
Do monkeys do this?
四个动作执行之后
After four actions are executed
猴子会不会发生
Will the monkey happen?
抓到香蕉的可能性呢
What about the chances of catching a banana?
啊依据这几个像排列
Ah, according to these images
这种状态排列出来之后
After this state is arranged
猴子到底会不会抓到香蕉呢
Will the monkey catch the banana?
所以所以我们要问城市嘛
So we have to ask the city
所以我们我们这边刚刚写了一个can get
So we just wrote a can get here.
会不会得到香蕉嘛
Will you get bananas?
叫做can can get哈
It's called can can get
就是say这个s
Just say this s.
我们就把写抄过来一下哈
Let's copy the writing over.
我们把这个抄过来
Let's copy this
我们这个重复了
We repeated this.
我们把它复制过来
We copy it.
改一些参数而已
Just change some parameters
好can get是
You can get it
这还是一样啊
Is it still the same?
我们我们的目标是这样子
We are our goal is to be like this
最后是有什么抓到了香蕉啊
What finally caught the banana?
就有抓到香蕉开始
Start by catching a banana
然后can get
Then you can get
这个时候我们把它改成stay one好了
Let's change it to stay one at this time
啊
Ah!
你不要用s
You don't use s.
你用stay one
You stay one
stay one之后呢
After staying one?
move当然就是这个s
Move is of course this s.
one就是指的是stay one
One means staying one
stay one然后m就是我们
Stay one and m us
这上面的木这个动作啊
Is this the move of the wood above?
我们就称它叫MOV木
Let's call it MOV wood
然后我们这个s two大概是指的是stay two
Then our s two probably means stay two.
好对
Right, right.
two
然后这边s two大概是stay two了
Then s two here probably stay two
好
OK
我们写完了
We're done.
我们把我们的概念转化成城市的概念
We translated our concept into a concept of the city
全部写在这边
Write it all here
然后我们现在就要问
And we need to ask them now.
城市就说猴子这样子的情况
The city says it's like this with monkeys
我们给他这样子的一种一种思考概念
And we gave him a notion of what it was like to think.
哈各种动作啊有抓啊
Ha, all kinds of movements, grab?
爬啊推啊走路啊
Climb, push, walk
啊还有说抓到香蕉的目标啊啊
Ah, and the target who caught the banana?
是怎么样抓
How to catch
然后我们现在
And here we are.
现在就要问这个动作
Ask about this move now
就是说can get
That means you can get
你要问那个城市的AI城市说
You have to ask the AI city of that city and say
can get
啊执行啊
Ah, execute.
执行这个
Execute this
can get这个
Can get this
从这边开始执行
Execute from here
can get什么呢
What can you get?
我们要得到这样子的状态
We want to get a state like this
就是STATD
STATD
猴子刚开始是在门的旁边
The monkey started by the door.
而且他的中坐标是在on floor
And his median coordinates are on floor
是在地板上
It's on the floor.
他起初状态
His initial state
初始状态
initial state
然后桌子是在窗户的旁边
Then the table is next to the window
at the window
状态然后这个时候猴子呢
Status and then what about the monkey at this time?
还没有当然是没有办法获得香蕉了
No, of course there is no way to get bananas.
就has now
这个状态是没有办法获得香蕉的
There is no way to get bananas in this state.
这个城市红色
The city is red
这个城市执行之后
After the city executes
他就会回到这边
He'll come back here
can stay stay one
开始做然后move stay one
Start, move, stay one
move stay two
这样子一个个的去执行
Do it one by one like this.
最后我们就会发现
Eventually we will find
城市就会告诉我们
The city will tell us
猴子最后有没有就是会获得香蕉
The monkey will get a banana in the end
can get就是获得香蕉呢
You can get a banana
啊
Ah!
猴子最后会不会获得香蕉这个意思
Will the monkey get the banana in the end?
好
OK
我们现在就要启动我们的编译器了
We're going to start our compiler now.
好我们启
Okay, here we go.
动我们的编译器的
Moving our compiler
叫做sweet prolog
Called sweet prolog
这个编译器啊
This compiler?
我们建立一个档案
We create a file
就是new
Is new
啊我这边已经写好了
Ah, I've already written it here.
把刚才的那个
Put the one just now
那个写的那些流程呢
What about those processes written?
我把写在这个档案上面
I wrote it on this file
我把它打开看看
I'll open it and take a look.
哎好
Oh good
打开这边打开了
Open, it's open here.
大家看看
Take a look.
这就是刚刚我们写的内容啊
Is this what we just wrote?
就是move steak middle on box middle
还是那一直到move steak climb
Or moving steak climbing
然后有drag啊
Then there is a drag.
drag就是push
Drag is push
我刚才我刚才是用push啊
I just used push just now
我这边写这个也是可以的
It is also possible for me to write this here.
好像这个名称是由我们自己定的
It seems that the name was chosen by ourselves
然后下次走路walk
And the next time you walk
那can get就stay开始
You can get to stay
然后现在就是它的状态
And now this is what it looks like.
是这样stay one到stay two
So stay one stay two
can get stay two
好
OK
我们城市已经输入进去之后
Our city has entered it.
我们先把暂时关掉
Let's turn it off for now.
然后我们来执行
Then we execute
就是说我们刚才问他的问题哈
That means the question we just asked him
啊我们要问他说猴子到
Ah, we're going to ask him that the monkey is here.
猴子在这个初始状态下到底会不会
Will the monkey in this initial state
最后会不会移动桌子
Will it eventually move the table?
爬上桌子
Climb up the table
然后抓到香蕉呢
Then catch the banana
会不会把复制过去
Will it be copied?
and get复制过去
And get copied
好
OK
那这边
This way
我们必须刚刚把刚才答案执行一次
We must have just executed the answer just now
所以我们这边是用control啊
So we use control here?
我们刚才叫做test p点p
We just called it test p point p
l嘛
L
然后就执行
Then execute
好已经执行了
OK, it has been executed.
好执行完毕
Okay, done.
我们就把刚刚那个复制的贴过来哈
Let's paste the copy just now.
can get stay at door on floor
at window
as now就是说在初始状态下
As now, in the initial state
猴子在门的旁边
The monkey is by the door
重坐标志在地板上
Re-sit sign on the floor
桌子是在窗户旁边
The table is by the window.
at winter这个时候是还没有获得香蕉
Bananas are not available at this time of winter
那他这样子城市
A city like him
这样一直执行下去
And it goes on and on.
会不会最后猴子会不会获得香蕉呢
Will the monkey get the banana in the end?
看看执行处
Look at the execution office
yes成功
Yes success
这个错误就是告诉我们
This mistake is telling us
说真的他他会获得香蕉
Seriously he will get bananas
好我们指的城市执行完毕了
Okay, the city we're referring to is executed
然后
And then...
这个程式呢
What about this program?
我们可以透过拍伞啊
We can shoot umbrellas.
我们现在用的语言是拍伞
The language we use now is umbrella.
我们可以拍伞里面前
We can shoot in front of the umbrella
哦
Oh.
拍散这个城市里面
Break up the city
潜入直入
Dive straight in
好了拍散直入
Okay, spread out and go straight in
植入
implant
好了开场就是植入
Okay, the beginning is the implantation
这个叫做有一个叫做three
This is called having one called three.
要属于prop的城市库
The city library to belong to the prop
我们就可以
We can
啊我们
Ah we
我们来到我们的浏览器哈
Here we go in our browser.
我们必须要先去下载软体一下哈
We have to download the software first.
一个是苏音
One is Su Yin
vlog这个城市
Vlog this city
然后在这边就是这个城
And over here is the city.
这个软体编辑器必须要先装到电脑上
This software editor must first be installed on the computer
然后透过拍诊去执行啊
Then execute it through photography?
然后这边下载软体来说单漏嘛
Then download the software here to say that the order is missing.
当然就按单漏
Of course, it will be missed according to the order.
这边11 Pro
11 Pro here
然后这边有stable release
Then there is a stable release here
你就按stable release
You press stable release
然后你就选最新版本
Then you choose the latest version.
叫11 pro 9.2就可以了
Just call 11 pro 9.2.
你就按进去
You just press in
然后他就会下载啊
Then he will download it.
这边按住stand
Hold the stand here
然后按这个
Then press this
好下载完毕之后你就自己执行
OK, you can do it yourself after downloading.
因为我已经下载了
Because I have already downloaded it.
所以我就哎
So I just
他也很快下载完毕
He also downloaded it quickly.
下载完毕就执行他
Execute it after downloading.
然后你就可以执行这个城市啊
Then you can execute the city.
执行他就好了
Just execute him.
然后你就会获得我们刚才的那个
Then you'll get the one we just had.
执行之后你就会获得这个城市啊
After execution, you will get the city.
这个编译器城市
This compiler city
但是我们需要在拍散里面去做
But we need to do it in the auction
人工智慧
Artificial Intelligence
去做人工智慧啊
Do artificial intelligence?
我们不要透过这个编译器啊
Let's not go through this compiler.
所以我们就把在拍散
So we broke up
拍散这个城市里面植入11 Pro
Break up the city and implant 11 Pro in it.
11 Pro Pro
这个这个城市库
This city library
我们把它
We put it
复制一下啊
Copy it.
我们照
We take a picture
我们照我们的浏览器
We click our browser
好我们到我们的浏览器了
OK, we're at our browser.
我们就找啊
Let's find it.
找一个叫做sweet VLOG的东西
Find something called a sweet VLOG
啊不是不是
Ah no no
叫做苏威prolog
Called Solvay prolog
我说错了
I was wrong.
苏威prolog是刚才那个编译器
Solvay prolog is the compiler just now
我们要找什么呢
What are we looking for?
我现在也啊
Me too.
我现在已经忘记了
I've forgotten it now.
那个城市库如何植入到拍厂里面
How is that city library implanted into the auction factory?
城市库
City Library
不过我们可以可以这样子搜寻看看
But we can search like this.
我们就说嗯苏威
Let's just say, um, Solvay
随便乱写
scribble casually
three prolog to
拍上它了
Got it.
这个关键字
This keyword
搜寻一下那个城市库
Search the city library.
啊叫做拍死位啊
Ah, it's called a death shot.
找到了哎
I found it.
叫做拍死位这个东西
It's called a dead spot.
拍死位
Shoot dead
然后在这边
Then here
我们在这个记号里面就有他的城市啊
We have his city in this sign.
他的城市部的城市
The city of his city ministry
在这边免费提供啊
Is it provided for free here?
我们这边word编译器可能写错了
Our word compiler may have written it wrong.
我们应该叫Piswi
We should be called Piswi.
植入Piswi
Implant Piswi
啊
Ah!
植入拍行为
implant auction behavior
我们下载这个下来
Let's download this.
我们看看
Let's see.
他这边有教我们
He has taught us.
啊这边有很多范例都可以练习
Ah, there are many examples here to practice
下载下来之后
After downloading
你就可以在我们的拍场
You can be at our auction
比如说我们在我们拍恰上执行啊
For example, we execute it on our order.
执行这个程式范例看
Execute this program example to see
试试看可不可以用
Try it out and see if it works.
好
OK
我们先照我们的拍恰看看
Let's take a look at our picture first.
好了拍恰
Okay, Pacha
好我们现在已经到我们的拍恰了
Okay, we're at our shoot now.
我已经把他的城市范例贴过来
I've posted his urban example
到这到这边让大家看啊
Come here, let everyone see
就是这个他的城市范例
This is his urban paradigm
哈我们把拍10位
Ha, let's shoot 10 digits
给植入到了那个拍一下里面
Implanted it into that one and pat it.
所以我们要呼叫拍10位这个城市库
So we're going to call the 10-digit city library
然后去执行
Then go to execute
看看会不会成功
See if it works.
这边意思说
I mean it here.
如果Michael是Michael是约翰的父亲father
If Michael is Michael is John's father
Michael father Michael John啊就是说
Michael father Michael John
Michael是约翰的父父亲那
Michael is John's father
Michael也是基纳的父亲的话
Michael is also Keena's father
那么我们用拍散成拍散成式去问
Then we use the patter-into-patter-into-patter-into-patter formula to ask
说请问Michael的Michael是谁的父亲s啊
Who is Michael's father?
就会列出来Michael是谁的父亲
Will list whose father Michael is
我们执行看看
Let's execute it.
好执行出来了
Okay, it worked.
答案就是麦克是约翰的父亲
And the answer is that Michael is John's father.
麦克是姬娜的父亲
Mike is Gina's father
好
OK
这就是我们在拍散里面
This is what we are doing in the auction.
植入这个人工智慧的城市库
Implant this AI city library
就可以在拍散上面执行的
It can be executed on the auction.
好
OK
我们今天课程就到此
That's all for today's class
我们已经成功执行了
We have successfully executed
我们成功了
We did it.
把那个猴子的概念
Put that monkey concept
转化成了现在城市里面的逻辑
Transformed into the logic in the city now
然后透过开场
Then through the opening
把那个城市库里面呼叫出来
Call out that city warehouse
也可以执行
Can also be implemented
好在开场里面执行就可以了
Fortunately, just execute it in the opening.
然后我们下次有呃第二集
Then next time we have, uh, episode two
将会深入的来写城市的啊
I will write about the city in depth.
今天只是先做个概念
Today is just a concept
下次就是来写城市的啊
Next time, I will write about the city.
好今天课程就到此
Okay, that's all for today's class
好
OK
拜拜下次见
Bye. See you next time.