⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node22.html

📁 robocup3d littlegreenbats_howtorobocop-0.1.tar.gz
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!--Converted with LaTeX2HTML 2002-2-1 (1.71)original version by:  Nikos Drakos, CBLU, University of Leeds* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from:  Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>getCurrentState()</TITLE><META NAME="description" CONTENT="getCurrentState()"><META NAME="keywords" CONTENT="howtorobocop"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="howtorobocop.css"><LINK REL="next" HREF="node23.html"><LINK REL="previous" HREF="node21.html"><LINK REL="up" HREF="node19.html"><LINK REL="next" HREF="node23.html"></HEAD><BODY ><DIV CLASS="navigation"><!--Navigation Panel--><A NAME="tex2html362"  HREF="node23.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html358"  HREF="node19.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html352"  HREF="node21.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html360"  HREF="node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="/usr/share/latex2html/icons/contents.png"></A>  <BR><B> Next:</B> <A NAME="tex2html363"  HREF="node23.html">getCapability()</A><B> Up:</B> <A NAME="tex2html359"  HREF="node19.html">Implementing a behavior</A><B> Previous:</B> <A NAME="tex2html353"  HREF="node21.html">Constructor (defining slots)</A> &nbsp; <B>  <A NAME="tex2html361"  HREF="node1.html">Contents</A></B> <BR><BR></DIV><!--End of Navigation Panel--><H3><A NAME="SECTION00651300000000000000">getCurrentState()</A></H3><P>The first virtual method to implement is <TT>getCurrentState</TT>. Different behaviors rely on different information of the world and/or agent state. In the BATS agent architecture a behavior defines this state itself in a standardized tree-based state description. This standardization is useful when using a learning algorithm to train different behaviors that use different state information. These state descriptions can also be used to define goals as states that should be reached, as we will see in the next sections.<P>A basic state description is a conjunction of the state of several variables. To cater for incertability, the state of a variable is defined as a range of possible values:<P><BR><DIV ALIGN="RIGHT" CLASS="mathdisplay"><!-- MATH \begin{equation}(0 \leq BallDist < 5) \wedge (10 \leq OpponentDist < 15)\end{equation} --><A NAME="eqState"></A><TABLE WIDTH="100%" ALIGN="CENTER"><TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><A NAME="eqState"></A><IMG WIDTH="336" HEIGHT="28" BORDER="0" SRC="img15.png" ALT="\begin{displaymath}(0 \leq BallDist &lt; 5) \wedge (10 \leq OpponentDist &lt; 15)\end{displaymath}"></TD><TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">(<SPAN CLASS="arabic">5</SPAN>.<SPAN CLASS="arabic">1</SPAN>)</TD></TR></TABLE><BR CLEAR="ALL"></DIV><P></P><P>A behavior's state is defined in its <TT>getCurrentState</TT> method. The <TT>createbehavior.pl</TT> script sets up a conjunction for you to place variables into. The following code shows how to create the state in <A HREF="#eqState">2.1</A>:<P><BR><IMG WIDTH="567" HEIGHT="145" ALIGN="BOTTOM" BORDER="0" SRC="img16.png" ALT="\begin{program}\begin{verbatim}rf&lt;State&gt; state = new State();rf&lt;OrNode&gt; dis ......ist'', 0, 5);con-&gt;addVar(''OpponentDist'', 10, 15);\end{verbatim}\end{program}"><BR><P><BR><HR><ADDRESS>Bram2007-11-18</ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -