ysf的沙龍
首頁
照片在說話
我的Python學習隨筆
Nature of Code閱讀心得與Python實作
老爺車與我
雜文
關於
ysf
2025/05/12
發佈於
Nature of Code閱讀心得與Python實作
The Nature of Code閱讀心得與Python實作:7.5 Object-Oriented Cells
這一節要用物件導向的方式來寫「生命遊戲」。
#
python
#
Python
#
PYTHON
1
留言
ysf
2025/05/05
發佈於
Nature of Code閱讀心得與Python實作
The Nature of Code閱讀心得與Python實作:7.4 The Game of Life
這一節介紹的是赫赫有名的2D CA:生命遊戲(the Game of Life)。
#
python
#
PYTHON
#
Python
1
留言
ysf
2025/04/14
發佈於
我的Python學習隨筆
原來Python呼叫函數時引數的傳遞方式是call by assignment
花了些時間,靜下心來,仔仔細細地研究了一番,總算把Python呼叫函數時引數的傳遞方式給徹底搞清楚了。
#
python
#
Python
#
PYTHON
1
留言
ysf
2025/04/04
發佈於
Nature of Code閱讀心得與Python實作
The Nature of Code閱讀心得與Python實作:7.3 Wolfram Classification
基礎CA的規則集總共有256個,經由這些規則集所生成的圖案,大部分看起來都平平無奇;不過,還是有些圖案真的是會讓人驚嘆不已,因為實在是跟自然界中可以看到的圖案樣式很相像。根據這些圖案的樣式和特性,Wolfram把它們分成四大類,接下來就來看看,這四大類的圖案各有怎樣的樣式和特性。
#
python
#
Python
#
PYTHON
喜歡
留言
ysf
2025/03/31
發佈於
Nature of Code閱讀心得與Python實作
The Nature of Code閱讀心得與Python實作:7.2 Elementary Cellular...
這節介紹Wolfram的基礎CA (elementary CA)設計方式,以及其迭代過程所構成的圖案。
#
python
#
Python
#
PYTHON
1
留言
ysf
2025/03/21
發佈於
照片在說話
你要吃海鮮還是要吹冷氣?
來聽聽照片在說什麼。
#
照片
#
相片
#
綠電
1
2
Red
2025/03/21
喜歡
的確很難選...呵
喜歡
ysf
發文者
2025/03/23
喜歡
Red 那就......夏天吹冷氣,冬天吃海鮮囉
喜歡
ysf
2025/03/21
發佈於
Nature of Code閱讀心得與Python實作
The Nature of Code閱讀心得與Python實作:7.1 What Is a Cellular...
細胞自動機的英文是cellular automaton,複數型態為cellular automata,簡稱CA,是一種由細胞物件所組成的系統模型。
#
python
#
Python
#
PYTHON
喜歡
留言
ysf
2025/03/17
發佈於
Nature of Code閱讀心得與Python實作
The Nature of Code閱讀心得與Python實作:Chap. 7 Cellular Automata
這一章介紹的是細胞自動機(cellular automaton),一種不是植基於物理定律的複雜系統。
#
Python
#
python
#
PYTHON
喜歡
留言
ysf
2025/03/14
發佈於
Nature of Code閱讀心得與Python實作
The Nature of Code閱讀心得與Python實作:Chap. 6 Physics Libraries
物理引擎裡頭有許多已經寫好的程式,可以用來模擬物理現象。例如,先前幾章中我們所模擬的物體的運動、單擺、彈簧等等,都可以在物理引擎中找到相關的程式,不需要自己從頭寫到尾;這就好像我們不自己寫,而會呼叫python的math模組中的許多數學函數如sin、cos等一樣。
#
python
#
Python
#
PYTHON
喜歡
留言
ysf
2025/03/10
發佈於
Nature of Code閱讀心得與Python實作
The Nature of Code閱讀心得與Python實作:5.6 Algorithmic Efficiency..
在模擬群聚行為時,隨著boid的數量越來越多,需要的計算量也會越來越多,導致程式的執行速度也跟著越來越慢,最後甚至於動彈不得。要克服這個問題,在寫程式時使用效率比較好的演算法,就是個不錯的主意。
#
python
#
Python
#
PYTHON
喜歡
留言
加入沙龍
加入沙龍