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

📄 attention_to_bma.c.ps

📁 Brainstormers(头脑风暴)队是05年robocup冠军,这是05年Brainstormers公布的源代码,Brainstormers是robocup老牌的德国强队
💻 PS
📖 第 1 页 / 共 3 页
字号:
  gsave    dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack    fnfs 0.8 mul hm rmoveto    show			% left title  grestore  exch  % stk: ct ltw rt  % 4. the right title  gsave    dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack    dup    pw exch stringwidth pop fnfs 0.8 mul add sub    hm    rmoveto    show			% right title  grestore  % stk: ct ltw rtw  % 5. the center title  gsave    pw 3 1 roll    % stk: ct pw ltw rtw    3 copy     % Move to the center of the left room    sub add 2 div hm rmoveto    % What is the available space in here?    add sub fnfs 0.8 mul sub fnfs 0.8 mul sub    % stk: ct space_left%%IncludeResource: font Helvetica-Bold  fHelvetica-Bold fnfs scalefont setfont    cfshow  grestore} bind def% Function border: prints virtual page border/border { %def  gsave				% print four sides    0 setgray    x v get y v get moveto    0.7 setlinewidth		% of the square    pw 0 rlineto    0 ph neg rlineto    pw neg 0 rlineto    closepath stroke  grestore} bind def% Function water: prints a water mark in background/water { %def  gsave    scx scy moveto rotate%%IncludeResource: font Times-Bold  fTimes-Bold 100 scalefont setfont    .97 setgray    dup stringwidth pop 2 div neg -50 rmoveto    show  grestore} bind def% Function rhead: prints the right header/rhead {  %def  lx ly moveto  fHelvetica fnfs 0.8 mul scalefont setfont  l-show} bind def% Function footer (cf rf lf -> -)/footer {  fHelvetica fnfs 0.8 mul scalefont setfont  dx dy moveto  show  snx sny moveto  l-show    fnx fny moveto  c-show} bind def%%EndResource%%BeginResource: procset a2ps-black+white-Prolog 2.0 1% Function T(ab), jumps to the n-th tabulation in the current line/T {   cw mul x0 add y0 moveto} bind def% Function n: move to the next line/n { %def  /y0 y0 bfs sub store  x0 y0 moveto} bind def% Function N: show and move to the next line/N {  Show  /y0 y0 bfs sub store  x0 y0 moveto}  bind def/S {  Show} bind def/p {  false UL  false BX  fCourier bfs scalefont setfont  Show} bind def/sy {  false UL  false BX  fSymbol bfs scalefont setfont  Show} bind def/k {  false UL  false BX  fCourier-Oblique bfs scalefont setfont  Show} bind def/K {  false UL  false BX  fCourier-Bold bfs scalefont setfont  Show} bind def/c {  false UL  false BX  fCourier-Oblique bfs scalefont setfont  Show} bind def/C {  false UL  false BX  fCourier-BoldOblique bfs scalefont setfont  Show } bind def/l {  false UL  false BX  fHelvetica bfs scalefont setfont  Show} bind def/L {  false UL  false BX  fHelvetica-Bold bfs scalefont setfont  Show } bind def/str{  false UL  false BX  fTimes-Roman bfs scalefont setfont  Show} bind def/e{  false UL  true BX  fHelvetica-Bold bfs scalefont setfont  Show} bind def%%EndResource%%EndProlog%%BeginSetup%%IncludeResource: font Courier%%IncludeResource: font Courier-Oblique%%IncludeResource: font Courier-Bold%%IncludeResource: font Times-Roman%%IncludeResource: font Symbol%%IncludeResource: font Courier-BoldOblique%%BeginResource: encoding ISO-8859-1Encoding/ISO-8859-1Encoding [/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /bullet /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def%%EndResource% Initialize page description variables./sh 595 def/sw 842 def/llx 24 def/urx 818 def/ury 571 def/lly 24 def/#copies 1 def/th 15.000000 def/fnfs 11 def/bfs 6.760028 def/cw 4.056017 def% Dictionary for ISO-8859-1 support/iso1dict 8 dict begin  /fCourier ISO-8859-1Encoding /Courier reencode_font  /fCourier-Bold ISO-8859-1Encoding /Courier-Bold reencode_font  /fCourier-BoldOblique ISO-8859-1Encoding /Courier-BoldOblique reencode_font  /fCourier-Oblique ISO-8859-1Encoding /Courier-Oblique reencode_font  /fHelvetica ISO-8859-1Encoding /Helvetica reencode_font  /fHelvetica-Bold ISO-8859-1Encoding /Helvetica-Bold reencode_font  /fTimes-Bold ISO-8859-1Encoding /Times-Bold reencode_font  /fTimes-Roman ISO-8859-1Encoding /Times-Roman reencode_fontcurrentdict end def/bgcolor [ 0 0 0 ] def/bg false def/ul false def/bx false def% The font for line numbering/f# /Helvetica findfont bfs .6 mul scalefont def/fSymbol /Symbol findfont def/hm fnfs 0.25 mul def/pw   cw 96.400000 muldef/ph   504.974083 th adddef/pmw urx llx sub pw 2 mul sub 1 div def/pmh 0 def/v 0 def/x [  0  dup pmw add pw add] def/y [  pmh ph add 0 mul ph add  dup] def/scx sw 2 div def/scy sh 2 div def/snx urx def/sny lly 2 add def/dx llx def/dy sny def/fnx scx def/fny dy def/lx snx def/ly ury fnfs 0.8 mul sub def/sx 5 def/tab 8 def/x0 0 def/y0 0 def%%EndSetup%%Page: (1-2) 1%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 2.839212 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(1) # (#include) K( ") p(attention_to_bma.h) str(") p n(2) # () S(#include) K( ") p(intentiontype.h) str(") p n(3) # () S(#include) K( ") p(blackboard.h) str(") p n(4) # () S(#include) K( ") p(ws_info.h) str(") p n(5) # () S(#include) K( ") p(ws_memory.h) str(") p n(6) # () S(#include) K( ") p(../policy/positioning.h) str(") p n(7) # () N(8) # () S(#if) K( 0) p n(9) # () S(#define) K( MYLOG_POL\(LLL,XXX\) LOG_POL\(LLL,XXX\)) p n(10) # () S(//#define MYLOG_DRAW\(LLL,XXX\) LOG_POL\(LLL,<<_2D<<XXX\)) c n(11) # () S(#else) K n(12) # (#define) S( MYLOG_POL\(LLL,XXX\) ) p n(13) # () S(#define) K( MYLOG_DRAW\(LLL,XXX\)) p n(14) # () S(#endif) K n(15) # () N(16) # () S(bool AttentionTo::initialized = false;) p n(17) # () N(18) # (AttentionTo::AttentionTo\(\) {) N(19) # (}) N(20) # () N(21) # (bool AttentionTo::get_cmd\(Cmd &cmd\) {) N(22) # () N(23) # () N(24) # (  construct_say_message\(cmd\);) N(25) # (  set_attention_to\(cmd\);) N(26) # () N(27) # (  ) S(return) K( true;) p n(28) # (}) N(29) # () N(30) # () S(void) k( AttentionTo::set_attention_to\(Cmd & cmd\){) p n(31) # (  ) S(if) K( \(cmd.cmd_att.is_cmd_set\(\)\){) p n(32) # (    MYLOG_POL\(0, << ") S(ATTENTION TO:  CMD FORM ALREADY SET !!! ) str("\);) p n(33) # (    ) S(return) K(;) p n(34) # (  }) N(35) # () N(36) # (  Vector target;) N(37) # (  Value speed;) N(38) # (  ) S(int) k( target_player_number;) p n(39) # () N(40) # (  ) S(// attention of PASS PLAYER) c n(41) # () S(  ) p(if) K(\(Blackboard::get_pass_info\(WSinfo::ws->time, speed, target, target_player_number\) == t) p n0 T (rue\){) N(42) # (    ) S(if) K( \( target_player_number > 0 \){) p n(43) # (      MYLOG_POL\(0, << ") S(ATTENTION TO: Set attention to pass_receiver ) str("<<target_player_number\);) p n(44) # (      cmd.cmd_att.set_attentionto\(target_player_number\);) N(45) # (    }) N(46) # (    ) S(return) K(;) p n(47) # (  } ) S(// pass player) c n(48) # () N(49) # () S(  ) p(int) k(  new_att= 0;) p n(50) # (  Vector ballholder_pos;) N(51) # (  ) S(int) k( ballholder;) p n(52) # (  ) S(if) K(\(teammate_controls_ball\(ballholder, ballholder_pos\)\){) p(// I do not control the ball myse) c n0 T (lf and a teammate has the ball) N(53) # () S(    ) p(if) K(\(ballholder >0 && ballholder != WSinfo::me->number\)) p n(54) # (      new_att = ballholder;) N(55) # (    MYLOG_POL\(0, << ") S(ATTENTION TO: Set attention to ball holder ) str("<<ballholder\);) p n(56) # (  }) N(57) # () N(58) # (  ) S(// if someone plays a pass, keep attention to him!) c n(59) # () S(  PPlayer p= WSinfo::get_teammate_with_newest_pass_info\(\);) p n(60) # (  ) S(if) K( \( p \) {) p n(61) # (    new_att = p->number;) N(62) # (    MYLOG_POL\(0, << ") S(ATTENTION TO: Set attention to pass giver ) str("<<new_att\);) p n(63) # (  }) N(64) # () N(65) # (  MYLOG_POL\(0,<<") S(ATTENTION TO: Current Attention to is set to player ) str("<< WSinfo::ws->my_attentionto\);) p n(66) # () N(67) # (  ) S(if) K(\(new_att == 0\){) p(// not set yet) c n(68) # () N(69) # () S(    PPlayer teammate;) p n(70) # () N(71) # () S(#if) K( 1 ) p(// debug information only) c n(72) # () S(    ) p(for) K(\() p(int) k( i=0; i<WSinfo::num_relevant_teammates;i++\){) p n(attention_to_bma.c) (Page 1/4) (Jul 28, 04 13:58) titleborder/v 1 store/x0 x v get 2.839212 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(73) # (      MYLOG_POL\(0,<<") p(ATTENTION 2: list of relevant teammates ) str("<<WSinfo::relevant_teammate[i]\);) p n

⌨️ 快捷键说明

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