發表文章

目前顯示的是 2021的文章

Tree Search: BFS, DFS, Best-First, and A* Search

圖片
This example is from MIT OCW   Artificial Intelligence . Consider the tree shown below. The numbers on the arcs are the arc lengths; the numbers near states B, C, and D are the heuristic estimates; all other states have a heuristic estimate of 0. Assume that the children of a node are expanded in alphabetical order when no other order is specified by the search, and that the goal is state J . No visited or expanded lists are used. What order would the states be expanded by each type of search. Write only the sequence of states expanded by each search. Breadth First Setep 1: Visited: A Queue: B, C, D Step 2: Visited: A, B Queue: C, D, E, F G Step 3: Visited: A, B, C Queue: D, E, F G, H Step 4: Visited: A, B, C, D Queue: E, F, G, H, I, J Step 5: Visited: A, B, C, D, E Queue: F, G, H, I, J Step 6: Visited: A, B, C, D, E, F Queue: G, H, I, J Step 7: Visited: A, B, C, D, E, F, G Queue: H, I, J Step 8: Visited: A, B, C, D, E, F, G,...

自製Otto二足機器人

圖片
本站Otto二足機器人相關文章: Otto 組裝( Assemble Your Own Otto ) Arduino Otto 跳舞機器人( Otto Dancing Robot ) Otto機器人動作之程式碼分析(Otto Source Code Understanding Part I) Otto機器人動作之程式碼分析2(Otto Source Code Understanding Part II) Arduino Otto 指令說明Otto Command List 如何設計Android手機遙控Otto Otto機器人之簡易版的移動方式 STEMbot提供的新版Otto 程式 Otto機器人之舞蹈動作App設計 官網 Otto DIY  有很多豐富的資料。 正文開始囉。 筆者試著使用紙箱來自製二足機器人,結果成功了。 電子材料如下: 名稱 數量 Arduino Nano 1 NANO UNO 多用 擴展板 1 HC-SR04超音波模組 1 SG90伺服馬達 4 5V 有源蜂鳴器 1 usb 線 1 母母杜邦線10公分 10 工具:剪刀、熱熔膠槍等。 筆者是將兩個 SG90伺服馬達 用熱溶膠槍給黏在一起。 實際動起來就像這個影片 Otto 大軍照。 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.

Solutions to SQL Zoo practice Part 2

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. For solutions to  SELECT basics and SELECT from world please refer to Solutions to SQL Zoo practice Part 1 . This post contains solutions to  SELECT from nobel .  針對 SQL Zoo ( https://sqlzoo.net/wiki/SQL_Tutorial ) 這個SQL學習網站的 SELECT from nobel 練習題,本文提供了一些參考解法。

Solutions to SQL Zoo practice Part 1

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. This post contains solutions to  SELECT basics  and  SELECT from world . 針對 SQL Zoo ( https://sqlzoo.net/wiki/SQL_Tutorial ) 這個SQL學習網站,本文提供了一些參考解法。 SELECT basics SELECT from world

電繪技巧入門:圓形速畫法

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. 筆者是用Windows系統裡的 Paint.NET 來做示範的。 圓形速畫角色法 先將背景的圖層上顏色。 步驟一:畫身體。 新增一個圖層名稱為身體,選擇橢圓形工具,按住Shift就可以畫出圓形。 步驟二:畫左腳。 新增一個圖層名稱為左腳,在身體左下方畫一個圓形的腳。 步驟三:畫右腳。 新增一個圖層名稱為右腳,在身體右下方畫一個圓形的腳。 步驟四:畫左手 新增一個圖層名稱為左手,在身體左上方畫一個圓形的手。 步驟五:畫右手 新增一個圖層名稱為右手,在身體右上方畫一個圓形的手。 步驟六:畫面 新增一個圖層名稱為面,在身體內用直線畫面。 步驟七:畫左眼 新增一個圖層名稱為左眼,在面裡面畫左眼。 步驟八:畫右眼 新增一個圖層名稱為右眼,在面裡面畫右眼。 步驟九:畫嘴巴 新增一個圖層名稱為嘴巴,在身體裡面畫嘴巴。 步驟十:畫帽子 新增一個圖層名稱為帽子,在身體上方畫帽子。 畫出一個戴著帽子又圓滾滾的卡通人物了!?

在 Ubuntu 上架設郵件伺服器

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much. 在架設郵件伺服器之前,需要有個網域名稱。讀者可至  https://codotvu.co/  申請免費網域名稱。本文使用 Ubuntu 20.04 做為架設的系統。 安裝與設定 postfix  安裝指令為 sudo apt install postfix 選擇 Internet Site 填入網域名稱,筆者填入自己在  https://codotvu.co/  的網域名稱 yunlinsong.co.vu 設定接收管理者收到Mail的Linux帳號名稱 設定伺服器接收哪些網域的Mail,並轉寄給User 這邊選擇 No Reply mail IP 設定,使用預設值即可 信箱大小,用 0 表示無上限 使用預設的 + 選擇 all,這樣 ipv4 與 ipv6 皆可使用   測試郵寄發送 使用 telnet 與 mail server 建立連線 telnet localhost 25 輸入底下指令設定寄件者與收件者: mail from: 寄件者信箱 rcpt to: 收件者信箱 輸入 data 指令,編輯信件內容。使用 獨立一行 的 . 符號 表示來結束內容編輯。輸入 quit 指令結束 telnet。 範例: 此時,就可以去收件人信箱看看有沒有收到郵件了。