渡河遊戲(River IQ) + Python AI模擬程式
61 次觀看·2024年8月1日
動動腦,測測你的邏輯思考
過河問題:
有一個農夫手裡拿著一顆高麗菜,帶著狼和山羊站在河的左岸。河上有一艘小船,但農夫一次只能帶一頭動物或是一顆高麗菜上船。另外,如果沒有農夫在場的話,狼會襲擊山羊,山羊會吃掉高麗菜。請問如果想要人、動物和蔬菜都平安無事抵達右岸,該怎麼做比較好呢?請寫出最快的方法。
好各位观众
Hello, everybody.
今天我们要继续探讨一个用城市
Today we are going to continue to explore a city with
如何用城市
How to use the city
城市去模拟我们的现实社会情况
Cities to simulate our social realities.
这边有一个经典故事啊
Is there a classic story here?
就是说有一个农夫手里拿着高丽菜
That is to say, there is a farmer with cabbage in his hand
还带着还带着山羊和一只狼啊
With a goat and a wolf?
在河岸河上有一艘船哈
There's a boat on the riverbank
这个船画的不好
This boat is not well drawn
这是个木筏哈
It's a raft
就是河上有一艘船
There's a boat on the river.
农夫只能一次带一个动物
Farmers can only bring one animal at a time
或者是一个高丽菜在船上
Or a cabbage on a boat
否则这个船太重的话会沉下去啊
Otherwise, if this ship is too heavy, it will sink.
农夫一次只能带一头动物
Farmers can only bring one animal at a time
或者是一颗高丽菜上船
Or a cabbage on board
如果没有农夫在场的话
If there were no farmers present
狼会怎样
What happens to wolves?
吃掉
eat
吃掉山羊哈
Eat the goat
那请问我们要如何把人
So how do we get people
动物和蔬菜平安的送达到右岸
Safe delivery of animals and vegetables to the right bank
好这边是左岸
Okay, this is the left bank
这边是右岸
This is the right bank.
好该怎么做呢
OK, and how do you do that?
好我们在写程式之前呢
Okay, what about before we write the code?
我们先来到网
Let's go to the net first
网站上下载一个这样子的一个游戏
Download a game like this on the website.
好在麦克so store里面是免费的哈
Fortunately, so it's free in the Mike store
我们进去看看
Let's go in and see
好我们打开我们的micros Microsoft store
Okay, let's open up our micros Microsoft store.
这个网址
This URL
然后搜寻
Then search
这个是河流嘛
Is this a river?
叫REVER
Called REVER
REVER IQ哦
REVER IQ
测试你的IQ如何帮这个农夫渡过河流
How Testing Your IQ Helped This Farmer Cross the River
搜寻
search
好我们找到了
OK, we got it.
这有很多种品牌
There are many brands.
很多种这种的
Many kinds of this
我们是要选
We are choosing
选的是我们要的
Choose what we want
我看这个是不是我们要的
I see if this is what we want.
好等一下
Ok wait a minute
好我们如果要找到跟我们的word档案
Okay, if we want to find the word file with us
一样的游戏的画面的话
The same game screen
我们必须要指定网址啊
We have to specify a URL.
因为这品牌太多了
Because there are too many brands.
我们要统一的关系
We want a unified relationship
我们就指定一个网址
We specify a URL
我们就打这个网址在这边
We'll type this URL here.
好按下去
OK, press it.
好这才是我们用的这
Okay, that's what we use.
这个品牌叫revertest
This brand is called revertest.
哎好像是一样的嘛
Hey, it seems to be the same.
对一样跟刚才那个是一样的
Yes, it's the same as the one just now.
抱歉是一样的软体啊
Sorry, is it the same software?
好我们就这边按取得
Okay, let's press get it here.
好等一下
Ok wait a minute
等他下载下来之后
After he downloads it
你就直接执行
You just do it.
就会到我们的游戏画面
It will come to our game screen.
我们来到了这个游戏的画面
And here we are in the video game.
我们要把农夫放在船上面
We're going to put the farmer on the boat
然后怕狼去吃羊
Then I am afraid that the wolf will eat the sheep
所以我们把羊放到这边
So we're going to put the sheep on this side.
看可以走吗
Can you go?
啊不许走
Ah don't go
他是说羊会吃高丽菜
He means that sheep eat cabbage.
如果农夫跟跟这个狼走掉的话
If the farmer follows the wolf
羊不是就是吃高丽菜
Sheep don't just eat cabbage
所以不行
So no.
所以狼要回来
So the wolf is coming back
所以羊过去
So the sheep went
啊一次就只能载两个
Ah, you can only carry two at a time.
所以就可以
So you can
对不对好
Right? Okay.
我们现在在
We are now
农夫再一个人再回去
The farmer goes back alone
农夫
Farmer
这时候如果把高丽菜放上去
At this time, if you put the cabbage on it
农夫跟高丽菜一起过去的话
If the farmer goes with the cabbage
会怎么样呢
What will happen?
然后农夫再回来
And the farmer comes back.
不行这个时候如果农夫回来的话
No, if the farmer comes back at this time
羊就会吃高丽菜
Sheep eat cabbage.
所以高丽菜还是要送回来
So the cabbage still has to be sent back.
农夫再坐船回去
The farmer goes back by boat
这应该农夫应该把狼放先放上去
The farmer should put the wolf on it first
然后农夫跟狼再一起过去
Then the farmer and the wolf go over again
好这样子
Ok so
就这样子会不会安全呢
Is it safe to do this?
可是农夫这样回去的话
But if the farmer goes back like this
狼不就会吃羊了吗
Don't wolves eat sheep?
看会不会啊
See if it will?
他说不行
He said no.
他说狼会吃羊
He said wolves eat sheep
所以这个羊要跟着农夫再回去
So the lamb has to follow the farmer back.
好那
Ok then
农夫就把高丽菜放上去
The farmer puts the cabbage on it
农夫再上去
The farmer goes up again
哎狼
Hey wolf
狼不会吃高丽菜
Wolves don't eat cabbage
所以就可以过去
So you can go
好这样子
Ok so
农夫再回来
The farmer comes back
然后农夫再打羊再过去
Then the farmer shoots the sheep and goes over
应该这样子就可以了
It should be like this.
啊
Ah!
成功我们终于达成我们的目的了
Success we finally achieved our purpose
好想必大家已经玩过了这个游戏
I'm sure everyone has already played this game
我们现在来写城市
We're going to write about cities now.
哦好
Oh yeah.
我们到我们的GPT
We go to our GPT.
这GBT里面
In this GBT
我已经写一个英文
I have written an English
问他说how to use什么three Pro去解决这个
Ask him how to use the three Pro to solve this
过河的问题哈
The problem of crossing the river
有这个狼啊
Is there a wolf?
山羊啊还有高丽菜的问题
Goats and cabbage.
这BG就回答了一大堆这些东西
And BG answered a bunch of these questions.
啊他连层次都帮你写好了
Ah, he even wrote the level for you
层次在这边好
The level is good here
我把这层次复制到我们的拍恰
I copied this layer into our Pacha
啊拍下
Ah take a picture
这边我已经把层次复制过来啊
I have copied the level here.
他直接执行就用层次
He directly executes using layers
用AI层次植入到我们的拍审来
Implant AI layers into our auction review
他就可以告诉我们这个路径该怎么走
He can tell us the path to take.
哈对
Ah, that's right.
那个农夫郎的那个路径该怎么走
How should the farmer's path be taken?
好我们执行看看
Okay, let's do it.
哎出来了
Hey, it's out.
我们要了解这个这个层次的意义呢
We need to understand the meaning of this level
首先我们要看哈总共有几个元素
So the first thing we're going to look at is, there are a couple of elements.
这个列表
This list
123 四
123 four
四个元素
Four elements
文到切GP里面
Text to cut GP
看它里面弹到什么四个元素的东西
See what four elements pop into it
四个元素
Four elements
哎
Hey
啊在这边
Ah, over here.
他说each day
He said each day
每一个状态可以用一个列表来表示
Each state can be represented by a list
这四个四个元素
These four elements
这四个元素是什么呢
What are these four elements?
这四个元素是第一个是农夫
The first of these is the farmer.
第二个是狼
The second is a wolf
第三个是山羊
The third is a goat
第四个是高丽菜
The fourth is cabbage
啊我们先把这个复制过去
Ah, let's copy this first
到我们的城市那边有所对应哈
It corresponds to our city.
我们到我们的城市开叉这边
Let's go to our city fork side
我们就在这边
We're right over here.
哎
Hey
应该拉到最后一行
Should be pulled to the last line
到这边
Over here.
好贴过来
OK, stick it over.
这样子有所对应嘛
Does this correspond?
好他说第一个农夫
Well he said the first farmer
农夫let啊
Farmer, let's go
这个河流从大家都是从左边开始
The river starts from everybody's left.
农夫狼
Farmer Wolf
还有山羊
And goats.
还有什么高丽菜
What else is cabbage?
然后首先是农夫
Then the farmer first
到右边就是red啊
To the right is red
农夫右边啊
Farmer's right
这个是什么
What is this?
这个是羊
This is a sheep.
农夫跟羊通通到右边
The farmer and the sheep all go to the right
只有狼跟高丽菜在左边
Only wolves and cabbage are on the left
所以是left left
So left left
所以下一个又是left left right left
So the next one is left left right left again.
然后又right right right right left
然后一直
Then always
一直循环
Keep looping
一直一直循环
Keep looping
最后最后全部都到河岸的右边
And they all end up on the right side of the river.
right right
right right
啊大家最后都到河岸的右边了啊
Oh, you all end up on the right side of the bank.
这不是跟我们游戏玩法是一样
It's not the same as how we play the game
只是他用程式直接告诉你答案
It's just that he uses the program to tell you the answer directly
马上就输出结果了啊
The result will be output soon.
他的所有的路径在这边
All his paths are here
好我们今天的
Ok our today
好各位
Hello, everybody.
我觉得我还是我们先讲一下城市啊
I think I should talk about cities first.
城市这边呢
What about this side of the city?
一开始我们是用拍死位啊
At first, we used to shoot the dead bit.
把它植入到我们的拍场城市里面
Plant it in our auction city
这个拍死位呢
What about this dead spot?
我们可以在网路上啊
Can we go online?
网路上随便选
Choose whatever you want on the Internet.
啊就看到passwid这个
Ah, I saw passwid.
这个叫g have的网站
This website is called g have
然后呢你就把它下载下来
And then what? You download it.
就用download zip把它下载下来解压缩
Just download it with download zip and unzip it
啊下载下来解压缩之后
Ah, download it and unzip it.
执行他的档案就会在我们的那个
Execute his file and it will be in our one
我们的那个拍审的路径上面
On the path of our auction.
好我们到我们的那个拍摄的路径哈
Okay, let's get to our shooting path.
我是放在他的那个Lib
I'm the Lib that put it on him.
lib就是他的那个城市库里面的
Lib is in his city warehouse.
什么
What!
就是有个塞package的地方
There's a place to stuff packages
好塞package找到进去
Okay, put the package in and find it
然后
And then...
啊看到了哦
Ah, I see it.
字太小看到叫做拍死位的地地方
The characters are too small to see the place called the dead spot.
就是在我们这个路径里面
It is in our path.
他就会增加一个fold叫做拍死位进去
He will add a fold called the death position
这就是他的层次嘛
This is his level
啊我们只要这几个层次码呢
Ah, we only need these level codes.
植入到我们的我们的拍摄就可以执行
Implanted into us, our shooting can be executed
在拍摄里面执行AI程式逻辑运算了
The AI program logic operation is executed in the shooting.
啊所以
Ah so
我们只要植入from Tai
We just need to implant from Tai
SWI in Pro prologue item就可以了
SWI in Pro prologue item is fine.
一开始你initial state是从左边
Your initial state is from the left
全部都左边
All left
然后我们要告诉他目标state go
Then we tell him the state goes
state是全部
State is all
全部要到右边哈
All to the right
就是这个
Here it is.
全部是在左边
All on the left
现在目标起始
Now target starts
目标起始的状态是全部
The starting state of the target is all
山羊农夫狼跟高丽菜
Goats, farmers, wolves and cabbage.
全部在左边
All on the left
目标是全部要到右边去哈
The goal is to all go to the right
所以你这边可以写一下就是
So you can write it down here.
这边是left
This is left
我们城市里面这边会写left哈然后呢
In our city, it will be written left here, and then what?
这边我们的目标是要到这边
Our goal here is to get here.
全部都要到这边到right
All to this side to the right
啊i阶梯right啊
Ah, i stepped right
这是我们的起始状态
So this is where we're starting.
left全部的东西
Everything left
总共12344样物件
A total of 12344 items
全部都要坐船过去到右边right
All have to take a boat to the right
这就是为什么我们的城市
This is why our cities
城市这边有left
There is a left side of the city
left left
然后right right right
And right right right
就是这个意思
That's what it means.
然后呢我们城市会先执行啊
Then, our city will implement it first.
就是说如果说是发了
That is to say, if it is sent
如果说农夫拿了这个先
If the farmer took this first
先带山羊
Take the goat first
不先带狼过去的话
If you don't take the wolf there first
我们的城市必须要写成这样子啊
Does our city have to be written like this?
木FF代表是农夫
Wood FF represents a farmer
s是代表ship
S is for ship.
是三阳c代表capit是什么
It is Sanyang c, which stands for capit. What is it?
高丽菜木高丽菜
Cabbage Wooden cabbage
然后到这边TTSC啊
Then come to TTSC here.
然后是这样子移动
And it moves like this.
然后solution
Then the solution
因为这个是纯粹的
Because this is pure
用我们拍审需要这个逻辑运算的东西
Use what we auction and need this logical operation for.
如果我们用拍审去写的话
If we use the auction to write
纯拍审去写这些东西会很累
It will be very tiring to write these things for pure auction review.
会很层次会很大
It's going to be big. It's going to be big.
而且会出错
And it goes wrong.
我们只要植入这个拍除位就可以了
We just need to implant this auction bit.
啊这个拍three呢
Ah, this is three shots
它原本是依照叫做three Provog
It was originally called the three Provog
这个城市库来的啊
Is this from the city library?
它是依照这个像啊
Is it based on this image?
sweet dog这个程式
Sweet dog this program
啊
Ah!
过来的
Come over
按进去
Press in
然后我们就按download啊
Then we press download.
就下载这个three Pro
Just download this three Pro
然后找这个稳定版啊
Then find this stable version?
稳定版table release按进去
Stable table release
然后我们找最新版本啊 11PRO
Then we look for the latest version 11PRO.
9.261按进去
9.261 Press in
然后这边啊
And this way?
这边还写一个
Write another one here.
这边有个understand i understand
There is an understanding here i understand
然后执行
Then execute
然后就会下载
Then it will be downloaded.
然后我们的城市
Then our city
就会下载到我们的那个电脑上面去了
It will be downloaded to our computer.
好就是这样
That's it.
我们在拍摄里面不需要用这个软体的
We don't need to use this software in the shooting.
因为这个软体已经做成了
Because the software has been made
什么
What!
在在拍恰里面已经植入进去了
It has been implanted in the pacha
叫做拍词位已经植入进去了
It's called the word pat, and it's already implanted.
所以我们是利用他的好处
So we're taking advantage of him.
利用他这个逻辑运算的好处去运算的
Take advantage of his logical operation to operate
啊
Ah!
好今天课程就到此为止
Okay, that's it for today's class
好拜拜
Okay, bye.

