亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? operator.java

?? SHOP2 一個人工智能里面關于任務分解和任務規劃的系統。JSHOP2是其java版本。
?? JAVA
字號:
package JSHOP2;import java.util.Vector;/** Each operator at run time is represented as a class derived from this *  abstract class. * *  @author Okhtay Ilghami *  @author <a href="http://www.cs.umd.edu/~okhtay">http://www.cs.umd.edu/~okhtay</a> *  @version 1.0.3*/public abstract class Operator extends DomainElement{  /** Represents the add list in case it is a real list and not a variable.  */  private DelAddElement[] add;  /** Represents the add list in case it is a variable (The integer value   *  represents variable's index), otherwise it is -1.  */  private int addVarIdx;  /** Cost of this operator.  */  private Term cost;  /** Represents the delete list in case it is a real list and not a variable.  */  private DelAddElement[] del;  /** Represents the delete list in case it is a variable (The integer value   *  represents variable's index), otherwise it is -1.  */  private int delVarIdx;  /** To initialize the operator.   *   *  @param head   *          head of the operator.   *  @param delVarIdxIn   *          the index of the delete list as a variable, -1 if the delete list   *          is not a variable.   *  @param addVarIdxIn   *          the index of the add list as a variable, -1 if the add list is   *          not a variable.   *  @param costIn   *          the cost of the operator.  */  public Operator(Predicate head, int delVarIdxIn, int addVarIdxIn,                  Term costIn)  {    super(head);    delVarIdx = delVarIdxIn;    addVarIdx = addVarIdxIn;    cost = costIn;  }  /** This function is used to apply this operator to a given state.   *   *  @param binding   *          the current binding.   *  @param s   *          current state of the world.   *  @param delAdd   *          a 4-member array of type <code>Vector</code> used to keep track   *          of the atoms and protections deleted from and added to the   *          current state of the world as the result of applying this   *          operator. This data can be used later in case of a backtrack to   *          undo these changes.   *  @return   *          <code>true</code> if the operator was applicable,   *          <code>false</code> otherwise. An operator is not applicable when   *          at least one of the atoms it tries to delete is protected.  */  public boolean apply(Term[] binding, State s, Vector[] delAdd)  {    //-- Initialze the 'delAdd' array.    delAdd[0] = new Vector();    delAdd[1] = new Vector();    delAdd[2] = new Vector();    delAdd[3] = new Vector();    //-- If the delete list is a variable,    if (delVarIdx != -1)    {      //-- Find what that variable is bound to.      List l = ((TermList)binding[delVarIdx]).getList();      //-- Iterate over the elements of the delete list.      while (l != null)      {        //-- Each element of the list should be a Predicate. Make that        //-- Predicate.        Predicate p = ((TermList)l.getHead()).toPredicate(0);        //-- If this atom is protected in the current state of the world, it        //-- can not be deleted, and therefore this operator can not be        //-- applied. Therefore, return false.        if (s.isProtected(p))          return false;        //-- To store the index of the deleted atom.        int index;        //-- Try to delete the atom from the current state of the world.        if ((index = s.del(p)) != -1)          //-- If the atom was really deleted from the current state of the          //-- world (i.e., it was there before), add it to the list of deleted          //-- atoms so that in case of a backtrack it can be added back. Also          //-- keep track of where the atom was, so that it can be added back          //-- exactly where it was. This is important because new bindings are          //-- calculated as they are needed (as opposed to calculating all of          //-- them in advance and returning them one-by-one), and therefore if a          //-- backtrack happens, the data strucutures should look exactly as          //-- they were before the backtracked decision to apply this operator          //-- was made.          delAdd[0].add(new NumberedPredicate(p, index));        l = l.getRest();      }    }    //-- If the delete list is a real list,    else    {      //-- For each delete/add element in the delete list,      for (int i = 0; i < del.length; i++)        //-- Try to delete the atom from the current state of the world.        if (!del[i].del(s, binding, delAdd))          //-- If the atom can not be deleted (i.e., it is protected), return          //-- false because this operator can not be applied.          return false;    }    //-- If the add list is a variable,    if (addVarIdx != -1)    {      //-- Find what that variable is bound to.      List l = ((TermList)binding[addVarIdx]).getList();      //-- Iterate over the elements of the add list.      while (l != null)      {        //-- Each element of the list should be a Predicate. Make that        //-- Predicate.        Predicate p = ((TermList)l.getHead()).toPredicate(0);        //-- Try to add the resulting (presumably ground) atom to the current        //-- state of the world.        if (s.add(p))          //-- If the atom was really added to the current state of the world          //-- (i.e., it wasn't there before), add it to the list of the added          //-- atoms so that in case of a backtrack it can be retracted.          delAdd[1].add(p);        l = l.getRest();      }    }    //-- If the add list is a real list,    else    {      //-- For each delete/add element in the add list,      for (int i = 0; i < add.length; i++)        //-- Add it to the current state of the world.        add[i].add(s, binding, delAdd);    }    return true;  }  /** To get the cost of this operator.   *   *  @param binding   *          the binding to be applied to the cost term.   *  @return   *          the cost of applying this operator.  */  public double getCost(Term[] binding)  {    return ((TermNumber)cost.bind(binding)).getNumber();  }  /** To set the add list.   *   *  @param addIn   *          the add list.  */  public void setAdd(DelAddElement[] addIn)  {    add = addIn;  }  /** To set the delete list.   *   *  @param delIn   *          the delete list.  */  public void setDel(DelAddElement[] delIn)  {    del = delIn;  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区三区四区| 精品国产自在久精品国产| 欧美精品自拍偷拍动漫精品| 久久亚洲免费视频| 亚洲第一成年网| 久久精品久久综合| 欧美视频精品在线| 精品剧情v国产在线观看在线| 欧美国产成人在线| 蜜臀va亚洲va欧美va天堂| 成人免费黄色大片| 欧美大肚乱孕交hd孕妇| 一区二区三区四区乱视频| 国产成人av资源| 精品国产免费久久 | 国产精品欧美精品| 六月婷婷色综合| 欧美久久久久久久久| 综合婷婷亚洲小说| www.日本不卡| 欧美高清在线一区| 乱一区二区av| 成人av电影在线观看| 欧美一级免费大片| 午夜国产不卡在线观看视频| 99这里只有久久精品视频| 国产三级一区二区三区| 狠狠色丁香婷婷综合| 欧美一区二区三区在线观看视频| 亚洲午夜电影在线观看| 色av综合在线| 一区二区高清视频在线观看| 色系网站成人免费| 亚洲激情自拍视频| 在线国产亚洲欧美| 亚洲午夜激情网页| 欧美丰满嫩嫩电影| 日韩中文字幕av电影| 91精品欧美久久久久久动漫| 日精品一区二区三区| 91精品久久久久久久久99蜜臂| 丝袜亚洲另类丝袜在线| 7777精品伊人久久久大香线蕉完整版 | 亚洲精品v日韩精品| 成人午夜短视频| 中文av一区二区| 9色porny自拍视频一区二区| 亚洲精品免费播放| 色天天综合色天天久久| 一区二区三区美女视频| 欧美午夜精品一区二区蜜桃| 亚洲123区在线观看| 欧美一卡二卡三卡| 国产精品一区二区男女羞羞无遮挡| 久久蜜臀精品av| 风间由美一区二区av101| 国产精品乱人伦| 91麻豆国产精品久久| 亚洲国产精品视频| 欧美一区三区二区| 国产99久久久久| 亚洲精品亚洲人成人网 | 国内精品第一页| 中文字幕av一区二区三区高| 色哟哟国产精品| 婷婷久久综合九色综合绿巨人| 91精品国产一区二区三区| 国产麻豆精品95视频| 国产精品三级电影| 欧美系列日韩一区| 国产主播一区二区三区| 成人免费一区二区三区视频| 欧美日韩免费在线视频| 国产精品一色哟哟哟| 亚洲一区成人在线| 国产欧美一区二区精品忘忧草| 色av一区二区| 国产成人小视频| 五月天久久比比资源色| 国产女人aaa级久久久级| 欧美伊人久久大香线蕉综合69| 精品一区二区三区香蕉蜜桃| 亚洲精品中文在线观看| 久久亚洲一级片| 欧美精选午夜久久久乱码6080| 成人综合在线网站| 美女网站一区二区| 一区二区不卡在线视频 午夜欧美不卡在| 欧美一区二区三区公司| 99久久久国产精品免费蜜臀| 免费在线视频一区| 亚洲欧美一区二区三区久本道91 | 久久综合资源网| 欧美日韩电影一区| 91免费看片在线观看| 国产精品亚洲一区二区三区在线 | 国产精品伦理在线| 精品久久国产字幕高潮| 欧美日韩精品一区二区三区蜜桃 | 欧美亚洲一区二区在线| 国产成人啪午夜精品网站男同| 日本一区二区三区高清不卡| 欧美精品粉嫩高潮一区二区| 99国产精品视频免费观看| 美国欧美日韩国产在线播放| 亚洲一区二区三区四区不卡| 亚洲欧美日韩电影| √…a在线天堂一区| 国产精品免费aⅴ片在线观看| 亚洲精品一区二区精华| 在线成人小视频| 777午夜精品视频在线播放| 欧美视频中文字幕| 欧美午夜在线观看| 久久中文字幕电影| 欧美一区二区三区视频免费| 欧美日韩美女一区二区| 色一区在线观看| 91成人免费在线| 欧美在线小视频| 欧美日韩一区在线观看| 欧美系列亚洲系列| 制服.丝袜.亚洲.另类.中文| 欧美视频在线观看一区| 欧美精选一区二区| 日韩色在线观看| 26uuu久久综合| 国产亚洲人成网站| 国产精品国产三级国产有无不卡| 中文字幕在线不卡一区| 亚洲另类色综合网站| 亚洲国产视频一区二区| 午夜精品福利视频网站| 蜜桃免费网站一区二区三区| 精品午夜一区二区三区在线观看| 国产麻豆精品久久一二三| 欧美日韩一区久久| 欧美大尺度电影在线| 国产性做久久久久久| 精品久久99ma| 欧美日韩国产另类一区| 91精品国产aⅴ一区二区| 日韩精品一区二区三区swag| 久久众筹精品私拍模特| 国产精品二区一区二区aⅴ污介绍| 国产精品福利av| 偷偷要91色婷婷| 国产高清精品在线| 91丝袜高跟美女视频| 欧美欧美欧美欧美| 久久久久国产一区二区三区四区 | 国产精品第四页| 亚洲国产精品欧美一二99| 奇米一区二区三区av| 粉嫩av一区二区三区在线播放 | 国产精品色噜噜| 午夜精品aaa| 色综合久久88色综合天天免费| 91亚洲国产成人精品一区二三 | 国产乱码字幕精品高清av | 午夜不卡av免费| 国产一区二区福利| 色综合久久久久久久久久久| 欧美一区二区三区四区高清| 久久久99久久| 亚洲超碰精品一区二区| 国产69精品久久久久777| 欧美日韩电影在线| 欧美激情中文不卡| 奇米888四色在线精品| 91国偷自产一区二区三区观看 | 91精品国产综合久久蜜臀| 国产喷白浆一区二区三区| 日韩精品一区第一页| 欧美精品一区二区在线播放| 精品国产免费视频| 亚瑟在线精品视频| 懂色av一区二区三区免费看| 日韩一区二区在线免费观看| 人人超碰91尤物精品国产| 99在线精品免费| 精品国产一区二区亚洲人成毛片| 亚洲一区在线观看免费观看电影高清 | 久久女同互慰一区二区三区| 亚洲成人一区在线| 一本色道亚洲精品aⅴ| 国产午夜三级一区二区三| 麻豆精品国产传媒mv男同| 欧美日韩一本到| 亚洲精品视频一区二区| 成人动漫中文字幕| www久久精品| 韩国一区二区在线观看| 日韩一区二区免费在线电影| 午夜精品久久久久影视| 欧美在线视频日韩| 亚洲一区二区欧美激情| 欧美性受xxxx| 一区二区三区四区激情| 91高清在线观看|