UE4 Study Notes (vii): AI

Source: Internet
Author: User

NavMesh, this one demo can not see what the pros and cons, editing up to is very convenient


Role control, like UE3, or Character+controller way, Character (Pawn) responsible for performance, controller responsible behavior. For AI, it is derived aicontroller to implement custom AI behavior

Unlike UE3, blueprint can replace many of the original scripts. In addition, UE3 is more dependent on the built-in state machine in the script for AI behavior control, UE4 introduces Behaviourtree


The basic idea is: Aicontroller in the blackboard record some data state what, and then run a behaviourtree, BT each node according to the relevant conditions to control the process branch, run the corresponding task

There are several concepts in the

Base: Blackboard: Save the Aicontroller instance and the data required by BT, can be seen as a place to share data between BP, can be key-value way to query/modify Selector: Run each child node sequentially until a result is success, and then return to success. If all fails, return failure Sequencer: Run each sub-node sequentially, and then run the next one successfully. The child node all succeeds returns success, one failure returns failure simple Parallel: You can execute another branch while executing a task, you can choose whether to cancel the other branch after the task finishes or wait for it to finish executing the task: The leaf node in the traditional BT concept is the actual thing to do Decorator: may be called "conditional" (condition) better understand some, is equivalent to if (XXX) {} Service: usually with blackboard interaction, Running to the current branch will perform the overall use of a complete set of AI can be implemented without writing code. Due to the existence of BP, the custom sub-node can also be implemented by dragging nodes, which reduces the dependence on the programmer. The application of Blackboard is a bright spot, and the data interaction and state management are much more convenient. BT can be triggered by events in BP, which is better than traditional BT performance. The most convenient is debugging, the current to which branch will be displayed on the BT:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.