Bogay
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 表演型遊戲 AI — 格鬥遊戲之應用 2021 TGDF 台北遊戲開發者論壇 [共筆筆記索引](/ZA0Ckn94T0yN_JM36Z3KPw) [官網連結](https://2021.tgdf.tw/speakers/9) 講者:戴文凱 # 動機 - 傳統 AI 基於規則設計 - 耗費成本歸納條件逐一處理,複雜且繁瑣 - 規則可以被預測 - 格鬥遊戲中的 AI - 陪玩:AI vs. 玩家 - 表演:AI vs. AI - 依照遊戲難度調整 AI 策略 # 系統目標 - 基於獎勵函數的風格化 AI - 改變各種因素受到的懲罰程度 - 設計動作腳本(script),使 AI 更可控 - 基於動作分類的風格化 AI - 根據遊戲中的動作特性進行分類 - 調整 AI 對不同種類的偏好程度,產生不同風格 - 基於特徵篩選的風格化 AI - 設計與遊戲風格相關的特徵指標 - 衡量 AI 在不同特徵為肚上的筆縣,分化出各式風格 # FightingICE > 詳細資訊可以參考 [這裡](http://www.ice.ci.ritsumei.ac.jp/~ftgaic/index.htm) - 簡化的格鬥遊戲環境 - 保留邏輯 - 簡化畫面呈現 - 三個角色,擇一操作 - 基本規則 - 每局三輪 - 每輪 60s - 初始血量 400 - 時間 / 血量耗盡,該輪結束 - 56 種動作,其中 40 個為玩家可控 - 移動、防禦、技能 - 移動 & 防禦無前搖後搖 - 技能分為三個階段,每個動作所需 frame 不同 - Startup - Active - Recorver - 分成空中與地面動作 ![](https://i.imgur.com/IiDBQpg.png) - AI決定下一個要做什麼 - 40 個可操作動作組成空間 - 16 個非玩家可操作的動作 # 基於獎勵函數的風格化 AI --- 強化學習 - Agent 在環境中探索,依據反饋形成決策,達到獎勵最大化 - 設定四個與風格相關的獎勵函數 - 受到傷害 - 造成傷害 - 雙方距離 - 時間 - 對於每個獎勵函數設定權重,調整後可以形成不同風格 - e.g. 加大造成傷害的權重,會以攻擊對手為主 - 會參考過去獎勵函數產生新的獎勵函數 ![](https://i.imgur.com/5lMwRxS.png) - 動作腳本 - 人為加入希望的行為慣性 - 若符合條件,則直接執行指定動作,跳過模型決策 - e.g. 能量足夠 + 攻擊範圍內 + 倒下狀態 -> 使用波動拳 - 防禦腳本 - 讓 AI 更狡猾:多使用後搖小的招式.....之類 > [name=Siganmorfu] ## Demo - 積極風格 - 權重 - 受到傷害: -0.2 - 造成傷害: 1 - 雙方距離: 0 - 時間: 0 - 結果 - 更傾向直接攻擊 - 不閃避敵人攻擊 - 傾向高傷害技能 - 保守風格 - 權重 - 受到傷害: -1 - 造成傷害: 0.2 - 雙方距離: 0 - 時間: 0 - 結果 - 執行跳躍的次數較高 - 盡力降低被擊中的機率 - 猛攻風格 - 權重 - 受到傷害: 1 - 造成傷害: 1 - 雙方距離: 1 - 時間: 1 - 結果 - 速戰速決 - 追著敵方猛打 - 盡可能縮短距離、加速比賽 # 基於動作分類的風格化 AI --- Monte Carlo Tree Search - 利用 MCTS 對動作進行探索 - 動作分三大類(移動、攻擊、防禦) - 每類分成兩個維度,共形成六個面向 ![](https://i.imgur.com/VbFyFGh.png) - 風格 - 貼近攻擊 ![](https://i.imgur.com/RlnrFvj.png) - 遠離防禦 - 多使用技能 ![](https://i.imgur.com/7pHqLw4.png) - 進攻耗能型 - 偏好使用需要能量的技能,但不會過於浪費 ![](https://i.imgur.com/JM8HY0m.png) - 進攻蓄能 - 喜歡放大招 ![](https://i.imgur.com/S7e6yM2.png) # 基於特徵摘選的風格化 AI --- 演化算法 - 滾動演化算法 (Rolling Horizon Evolution Algorithm: RHEA) - 透過與環境交互並不斷優化個體,演化出最佳個體的過程 - RHEA based method - 每個世代包含四個個體,每個個體包含三個基因,對應不同動作 - 對手模型 - 讓 AI 預測對方動作 - 相較於去年 (2020) 冠軍有 58% 勝率 # 基於特徵摘選的風格化 AI --- Map-Elites - 基於演化算法的變種,定義需要優化的特徵,進行挑選 - 個體定義 - 多個動作組成的序列 - 評估方式 - 是否贏得遊戲 - hp ## Demo - 移動型 - 防禦型 - 耗能型 - etc. # 問題與討論 ![](https://i.imgur.com/TI7Y97P.png) - MCTS / Map-Elites 比較花時間,投入實務應用還需要再優化 - 結合演化算法與強化學習 - 先透過演化算法生成權重 - 再透過強化學習訓練 # Q&A - 請問有開源或是商用版本可讓開發者去嘗試? - 請發 email 給我們 (wktai@mail.ntust.edu.tw),我們可以分享研發成果 - 人為輸入的腳本,有保證一定會比 AI 自行訓練出來的決策來得好嗎? - 人為輸入的腳本,是一種 pattern,也就是,在某種情境下的最佳反應(action) 因此,可以節省訓練的時間,也達到最好的效果。 - 這個演算法能否套用到類魂遊戲的怪物 AI,如果不能的話,未來是否有計畫設計該演算法 - 因為 不同遊戲有不同狀態(state),遊戲中的角色可用動作(action)也會有不同。所以,需要重新訓練 model - 請問此增強學習是使用 DQN 嗎 - 基於 D3QN,再加上 SAC、PPO 等技術 ###### tags: `2021TGDF` `台北遊戲開發者論壇` `共筆筆記`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully