行動 (Movement) 靜宜大學資工系 蔡奇偉 副教授.

Slides:



Advertisements
Similar presentations
7.2. AI E NGINE AND S TEERING B EHAVIOUR I Design of an AI Engine and introduction to steering in game AI.
Advertisements

7.3. S TEERING B EHAVIOUR II Steering behaviours in game AI.
Transform-domain Wyner-Ziv Codec for Video 教師 : 楊士萱 老師 學生 : 李桐照 同學.
資料蒐集的方法(三):實驗法(實驗設計) (第七章)
Divide-and-Conquer. 什麼是 divide-and-conquer ? Divide 就是把問題分割 Conquer 則是把答案結合起來.
OCLC NetLibrary 電子書 文崗資訊股份有限公司. 2015/6/2 文崗資訊股份有限公司 2 What is NetLibrary ? 權威性: OCLC 旗下,為全球最知名的電子書資料庫 使用廣泛: 目前全球有超過 14,000 家圖書館採用此服務 新穎性: 每月 2,000 本的速度增加中.
1 Q10276: Hanoi Tower Troubles Again! 星級 : ★★★ 題組: Online-judge.uva.es PROBLEM SET Volume CII 題號: Q10276: Hanoi Tower Troubles Again! 解題者:薛祖淵 解題日期: 2006.
期末專題 - 吊人頭遊戲 第 35 組 組員 : 電機系 49841XXXX XXX 電機系 49841OOOO OOO.
核心能力意見調查 計畫主持人:劉義周教授 研究助理: 林珮婷 報告日期: 調查案的目標與性質 調查的主要目的在進行宣傳,讓全校師生可以瞭 解何謂「課程地圖」與「核心能力」。 通識中心將核心能力主要區分為「學術訓練」、 「就業準備」、「公民文化養成」、「個人特質 提升」等四大面向,本調查依據此四大面向進一.
1 第一章 Word 的基本觀念 內容概要: Word 的特色 啟動與離開 Word 的方法 滑鼠游標與外型的介紹 基本操作 Word 視窗法則 使用 Word 遭遇問題時, 應如何利用軟體特 性而獲得輔助解說.
: Boxes ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11003: Boxes 解題者:蔡欣燁 解題日期: 2007 年 3 月 19 日.
Chapter 0 Computer Science (CS) 計算機概論 教學目標 瞭解現代電腦系統之發展歷程 瞭解電腦之元件、功能及組織架構 瞭解電腦如何表示資料及其處理方式 學習運用電腦來解決問題 認知成為一位電子資訊人才所需之基本條 件 認知進階電子資訊之相關領域.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
: Y-game ★★★☆☆ 題組: Contest Volumes with Online Judge 題號: 11841: Y-game 解題者:林雨姍 解題日期: 2011 年 5 月 19 日 題意: Y-game 是一個在三角型網格上放白 子與黑子的遊戲。根據題目給的點,判斷.
: OPENING DOORS ? 題組: Problem Set Archive with Online Judge 題號: 10606: OPENING DOORS 解題者:侯沛彣 解題日期: 2006 年 6 月 11 日 題意: - 某間學校有 N 個學生,每個學生都有自己的衣物櫃.
STAT0_corr1 二變數的相關性  變數之間的關係是統計研究上的一大目標  討論二分類變數的相關性,以列聯表來表示  討論二連續隨機變數時,可以作 x-y 散佈圖觀察它 們的關係強度  以相關係數來代表二者關係的強度.
MATLAB 程式設計 第 11 章 多維陣列 多維陣列的定義 在 MATLAB 的資料型態中,向量可視為 一維陣列,矩陣可視二維陣列,對於維 度 (Dimensions) 超過 1 的陣列則均可視 為「多維陣列」 (Multidimesional Arrays , 簡稱 N-D Arrays)
8.1 何謂高度平衡二元搜尋樹 8.2 高度平衡二元搜尋樹的加入 8.3 高度平衡二元搜尋樹的刪除
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
: The Playboy Chimp ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10611: The Playboy Chimp 解題者:蔡昇宇 解題日期: 2010 年 2 月 28 日 題意:給一已排序的數列 S( 升冪.
Department of Air-conditioning and Refrigeration Engineering/ National Taipei University of Technology 模糊控制設計使用 MATLAB 李達生.
Integrated single vendor single buyer model with stochastic demand and variable lead time 指導教授:林燦煌 博士 指導教授:林燦煌 博士 研 究 生:黃笙源 研 究 生:黃笙源 M. Ben-Daya, M. Hariga.
具備人臉追蹤與辨識功能的一個 智慧型數位監視系統 系統架構 在巡邏模式中 ,攝影機會左右來回巡視,並 利用動態膚色偵測得知是否有移動膚色物體, 若有移動的膚色物體則進入到追蹤模式,反之 則繼續巡視。
參考文獻 補充說明. 參考文獻 一、文獻探討 二、文獻引用 一、文獻探討 (一)過程 1. 尋找、蒐集所欲研究領域中現有的文獻 2. 閱讀所選擇的文獻(宜做研究摘要並分門別 類加以彙整) 3. 發展理論架構作為進一步文獻尋找和探討的 參考 4. 發展議題(文獻探討之大綱)以統整、分析 相關文獻資料.
: The Battle II ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11098: The Battle II 解題者:許桓偉 解題日期: 2007 年 3 月 13 日 題意:給一連串炸彈座標、半徑、爆炸範 圍 (Xi,Yi,Ri,Ei)
: Next Same-Factored ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: : Next Same-Factored 解題者:蔡宗翰 解題日期: 2008 年 5 月 9 日 題意: 給一個整數 X ,求出.
台灣客家知識治理之研究 -- 以 行政院客委會為例 發表人: 彭安麗 南華大學公共行政與政策研究所助理教授 發表人: 彭安麗 南華大學公共行政與政策研究所助理教授
第 5 章 線性規劃的假設分析 學習目標 5.2 繼續偉伯公司的個案研究(5.2節) 5.3
: War on Weather ★★☆☆☆ 題組: Contest Volumes Archive with Online Judge 題號: 10915: War on Weather 解題者:陳明凱 題意:題目總共會給你 k 個點座標代表殺手衛星的位置, 距離地球表面最少 50 公里以上,並且會給你.
Ubiquitous News(Unews) 的設計與實作 指導教授:黃毅然 教授 學生:葉雅琳 系別:資訊工程學系.
: Playing War ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11061: Playing War 解題者:陳盈村 解題日期: 2008 年 3 月 14 日 題意:在此遊戲中,有一類玩家一旦開始攻擊, 就會不停攻擊同一對手,直到全滅對方或無法再.
North Point Government Primary PM School 北角官立下午小學 應用 ‘ 基本能力學生評估 ’ 及 ‘ 網上學與教支援系統 ’ 經驗分享.
生產系統導論 生產系統簡介 績效衡量 現代工廠之特徵 管理機能.
Analysis of Variance (ANOVA) CH 13 變異數分析. What is ANOVA? n 檢定 3 個或 3 個以上的母體平均數是否相等的統計檢定 n 檢定多個母體平均數是否相同 n 比較大二、大三、大四學生實習滿意度是否一樣 ? ( 來 自相同的 population)
卡內基訓練  Copyright, 1997 © Dale Carnegie & Associates, Inc. 1 簡報標題 TIP 如需進一步建議, 請看卡內基訓練  的簡報技巧.
: 05-2 Rendezvous ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11015: 05-2 Rendezvous 解題者:池明洋 解題日期: 2006 年 4 月 16 日 題意: 給 node N 個 , edge.
: Lucky Number ★★★★☆ 題組: Proble Set Archive with Online Judge 題號: 10909: Lucky Number 解題者:李育賢 解題日期: 2008 年 4 月 25 日 題意:給一個奇數數列 1,3,5,7,9,11,13,15…
「防止青少年吸煙」 回顧與前瞻. 流程:  計劃簡介  服務特色  報告研究事項  回顧工作內容  展望未來.
: GCD - Extreme II ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11426: GCD - Extreme II 解題者:蔡宗翰 解題日期: 2008 年 9 月 19 日 題意: 最多 20,000 組測資,題目會給一個數字.
Chapter 8 遊戲人工智慧.
資料結構實習-二.
: Expect the Expected ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11427: Expect the Expected 解題者:李重儀 解題日期: 2008 年 9 月 21 日 題意:玩一種遊戲 (a game.
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
Chapter 10 m-way 搜尋樹與B-Tree
: Function Overloading ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11032:Function Overloading 解題者:許智祺 解題日期: 2007 年 5 月 8 日 題意:判對輸入之數字是否為.
Probability Distribution 機率分配 汪群超 12/12. 目的:產生具均等分配的數值 (Data) ,並以 『直方圖』的功能計算出數值在不同範圍內出現 的頻率,及繪製數值的分配圖,以反應出該 機率分配的特性。
: Help My Brother ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11033: Help My Brother 解題者: 呂明璁 解題日期: 2007 年 5 月 14 日.
教學卓越計畫 讀書會 WIKI 教學. 大綱 WIKI 影片介紹 高醫 WIKI 申請 WIKI 操作.
冷凍空調自動控制 - 系統性能分析 李達生. Focusing here … 概論 自動控制理論發展 自控系統設計實例 Laplace Transform 冷凍空調自動控制 控制系統範例 控制元件作動原理 控制系統除錯 自動控制理論 系統穩定度分析 系統性能分析 PID Controller 自動控制實務.
連續隨機變數 連續變數:時間、分數、重量、……
Knowledge Management System -for Agenda 顏亦笛 陳靖宜 指噵教授 : 劉寶均教授 指噵公司 : 安捷達.
指導教授 : 林啟芳 教授 組員 : 邱秉良 林育賢. 何謂 GPS  GPS 即全球定位系統,是一個中距離圓 型軌道衛星導航系統。它可以為地球表面 絕大部分地區( 98% )提供準確的定位、 測速和高精度的時間標準。
-Artificial Neural Network- Matlab操作介紹 -以類神經網路BPN Model為例
Android 遊戲設計模組 1 Android 開發環境建構 郭育政 東吳大學資訊管理系 涂昆源 萬能科技大學資訊工程系 余執彰 萬能科技大學資訊工程系 周建興 淡江大學電機工程系 林旭陽 東吳大學資訊管理系 教育部網路通訊人才培育先導型計畫 ─ 課程發展計畫.
數字系統與資料表示法 教師: 陳炯勳 數系轉換 r進制數字 稱為 base r或 radix r 有r個計數符號,計數順序逢r歸零(進位) A n A n - 1 ‥‥A 2 A 1 A 0 ﹒A -1 A -2 ‥‥A -m 其中A n 及A.
: GCD (I) ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11424: GCD(I) 解題者:李育賢 解題日期: 2008 年 9 月 19 日 題意: 最多 20,000 組測資,題目會給一個數字 N(1
:Rings and Glue ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10301: Rings and Glue 解題者:施博修 解題日期: 2011 年 5 月 18 日 題意:小約翰有了個大麻煩,他不小心將 rings.
單張圖像,多個 3-D 模型 3D morphable model face animation Volker Blantz by Volker Blantz.
Simulation 直接模擬 (I) Date: June 3, 2009 Introducer: Hsing-Yen Ann.
: How many 0's? ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11038: How many 0’s? 解題者:楊鵬宇 解題日期: 2007 年 5 月 15 日 題意:寫下題目給的 m 與 n(m
Running Cat 周弘禮 林靖雅 王柔文.
極座標 第十七單元 Polar Coordinate System To plot points in Polar Coordinates.
XNA 4.0 簡介 靜宜大學資工系 蔡奇偉 副教授 © 大綱 XNA 簡介 XNA Framework XNA Build XNA Game Studio 建立 XNA 4 的專案 方案的目錄結構 XNA Game Studio 4.0 參考手冊 Hello, XNA XNA Game.
今日課程內容 CH9 質心與動量 CH10 轉動 二維碰撞 角位移、角速度、角加速度 等角加速度運動 轉動與移動關係 轉動動能 轉動慣量
行銷學原理‧曾光華、饒怡雲 著‧前程文化 出版
1 Game AI Steering Behavior & Group Movement ( 轉向行為 及 群體運動 )
Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.
Quaternion 靜宜大學資工系 蔡奇偉副教授 大綱  History of Quaternions  Definition of Quaternion  Operations  Unit Quaternion  Operation Rules  Quaternion Transforms.
Steering behaviours in game AI
Vertex Array Objects & Buffer Objects
Presentation transcript:

行動 (Movement) 靜宜大學資工系 蔡奇偉 副教授

大綱 The Basics of Movement Algorithms Kinematic Movement Algorithms Steering Behaviors Combining Steering Behaviors Predicting Physics Jumping Coordinated Movement

遊戲人工智慧的模型

The Movement algorithm Structure

Statics struct Static: position # a 2D vector orientation # a single floating point value The 2D movement axes and the 3D basis The positions of characters in the level

右手座標系統: 左手座標系統:

Kinematics struct Kinematic position # a 2 or 3D vector orientation # a single floating point value velocity # another 2 or 3D vector rotation # a single floating point value struct SteeringOutput: linear # 加速度 a 2 or 3D vector angular # 角加速度 a single floating point value

struct Kinematic: ... Member data as before ... def update(steering, time): # Update the position and orientation position += velocity * time + 0.5 * steering.linear * time * time orientation += rotation * time + 0.5 * steering.angular * time * time # and the velocity and rotation velocity += steering.linear * time rotation += steering.angular * time

簡化版(因為 time 值很小) struct Kinematic: ... Member data as before ... def update (steering, time): # Update the position and orientation position += velocity * time orientation += rotation * time # and the velocity and rotation velocity += steering.linear * time rotation += steering.angular * time

Kinematic Movement Algorithms Seek Flee Arriving Wandering

def getNewOrientation(currentOrientation, velocity): # Make sure we have a velocity if velocity.length() > 0: # Calculate orientation using an arc tangent of # the velocity components. return atan2(-velocity.x, velocity.z) # Otherwise use the current orientation else: return currentOrientation

Kinematic Seek(尋找) A kinematic seek behavior takes as input the character’s and their target’s static data. It calculates the direction from the character to the target and requests a velocity along this line. target character

struct KinematicSteeringOutput: velocity rotation class KinematicSeek: # Holds the static data for the character and target character target # Holds the maximum speed the character can travel maxSpeed

# Create the structure for output target character def getSteering(): # Create the structure for output steering = new KinematicSteeringOutput() # Get the direction to the target steering.velocity = target.position - character.position # The velocity is along this direction, at full speed steering.velocity.normalize() steering.velocity *= maxSpeed # Face in the direction we want to move character.orientation = getNewOrientation(character.orientation,steering.velocity) # Output the steering steering.rotation = 0 return steering

Kinematic Flee(逃跑) If we want the character to run away from their target, we can simply reverse the second line of the getSteering method to give # Get the direction away from the target steering.velocity = character.position - target.position The character will then move at maximum velocity in the opposite direction. target character

Arriving(抵達) (1) (2) (3) (4) 超過目標,須返回 target character target

解決方法: 一、角色進入目標範圍圈內,即表示已抵達。 二、減速接近目標。 三、在目標範圍圈才減速接近目標。 target character

Wandering(徘徊) A kinematic wander behavior always moves in the direction of the character’s current orientation with maximum speed. The steering behavior modifies the character’s orientation, which allows the character to meander as it moves forward.

class KinematicWander: character maxSpeed # Holds the maximum rotation speed we’d like, probably # should be smaller than the maximum possible, to allow # a leisurely change in direction maxRotation def getSteering(): # Create the structure for output steering = new KinematicSteeringOutput() # Get velocity from the vector form of the orientation steering.velocity = maxSpeed * character.orientation.asVector() # Change our orientation randomly steering.rotation = randomBinomial() * maxRotation # Output the steering return steering def randomBinomial(): return random() - random()

Steering Behaviors