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

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

?? lithos.htm

?? 利用GA算法實現軟件測試的測試用例選取
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0045)http://www.esatclear.ie/~rwallace/lithos.html -->
<HTML><HEAD><TITLE>Lithos</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<CENTER>
<H1>Lithos</H1></CENTER>
<P>Lithos is a stack based evolutionary computation system. Unlike most EC 
systems, its representation language is computationally complete, while also 
being faster and more compact than the S-expressions used in genetic 
programming. The version presented here applies the system to the game of Go, 
but can be changed to other problems by simply plugging in a different 
evaluation function. Source code and Windows executable are provided. Let me 
know by <A href="mailto:rwallace@esatclear.ie">email</A> if you have any queries 
or interesting results or modifications. 
<P>This software is in the public domain. 
<P>THIS SOFTWARE IS PROVIDED STRICTLY AS IS. THE AUTHOR MAKES NO REPRESENTATION 
OR WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF 
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. UNDER NO CIRCUMSTANCES 
SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT OR INDIRECT EXPENSES OR DAMAGES AS A 
RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE. 
<P><A name=Contents>
<H2>Contents</H2></A>
<P>
<UL>
  <LI><A 
  href="http://www.esatclear.ie/~rwallace/lithos.html#The genetic algorithm"><B>The 
  genetic algorithm</B></A> 
  <UL>
    <LI><A 
    href="http://www.esatclear.ie/~rwallace/lithos.html#Parameters">Parameters</A> 

    <LI><A 
    href="http://www.esatclear.ie/~rwallace/lithos.html#The next generation">The 
    next generation</A> 
    <LI><A href="http://www.esatclear.ie/~rwallace/lithos.html#The log file">The 
    log file</A> </LI></UL>
  <LI><A 
  href="http://www.esatclear.ie/~rwallace/lithos.html#The virtual machine"><B>The 
  virtual machine</B></A> 
  <UL>
    <LI><A 
    href="http://www.esatclear.ie/~rwallace/lithos.html#The instruction set">The 
    instruction set</A> 
    <LI><A 
    href="http://www.esatclear.ie/~rwallace/lithos.html#Control flow">Control 
    flow</A> </LI></UL>
  <LI><A 
  href="http://www.esatclear.ie/~rwallace/lithos.html#Example programs"><B>Example 
  programs</B></A> 
  <UL>
    <LI><A 
    href="http://www.esatclear.ie/~rwallace/lithos.html#Factorial(n) recursive style">Factorial(n) 
    recursive style</A> 
    <LI><A 
    href="http://www.esatclear.ie/~rwallace/lithos.html#Factorial(n) iterative style">Factorial(n) 
    iterative style</A> </LI></UL>
  <LI><A 
  href="http://www.esatclear.ie/~rwallace/lithos.html#The game of Go"><B>The 
  game of Go</B></A> 
  <LI><A 
  href="http://www.esatclear.ie/~rwallace/lithos.html#Download"><B>Download</B></A> 
  </LI></UL>
<P><A name="The genetic algorithm">
<H2>The genetic algorithm</H2></A>
<P>Like other evolutionary computation systems, Lithos evolves a population of 
individuals. In each generation, every individual is tested for fitness at a 
task, then the less fit ones are replaced by offspring of the more fit ones, 
using crossover and mutation to achieve variety. 
<P>In this case, the individuals are programs, each represented as a sequence of 
instructions. In testing fitness, each program is run on some input and the 
output is evaluated according to some measure of quality. In the version 
presented here, the input is the current state of the board in the game of Go, 
and the output is interpreted as a decision about the next move to make. 
<P><A name=Parameters>
<H3>Parameters</H3></A>
<P>The system is controlled by the following parameters: 
<P><B>Population</B> is the number of programs. This doesn't change over time; 
offspring of more fit programs replace less fit ones. 
<P><B>Max Size</B> is the maximum allowed size of a program. (At the start of a 
run, the entire population is initialized to empty programs. Crossover and 
mutation may produce longer or shorter programs as generations go by, up to 
<I>Max Size</I> instructions.) 
<P><B>Max Memory</B> is the number of words of memory available to each program 
at run time. (This does not include the memory to store the program code.) Must 
be at least large enough to hold the program's input data; for the game of Go, 
this means at least 383 words. 
<P><B>Max Time</B> is the number of instructions can execute during its 
"thinking time" in each move of the game (or step of the task or whatever). If 
this is exceeded, the program times out and whatever it has left on the stack at 
that point is taken as its output. 
<P><B>Max Moves</B> is the maximum number of moves the game is allowed to 
continue for. (In practice this will rarely be reached.) 
<P><B>Overselection Rate</B> is the number of individuals in each generation 
guaranteed to be transmitted unchanged to the next. With the default value of 2, 
the best 2 individuals are copied to the next generation before tournament 
selection takes place for the rest of the population slots. 
<P><B>Tournament Size</B> is the number of individuals involved in each 
selection tournament. 
<P><B>Crossover Rate</B> and <B>Mutation Rate</B> control how often these two 
operators will be applied when producing offspring programs for the next 
generation. The default values of 50 and 50 mean they are equally likely to be 
applied; 90 and 10, for example, would apply crossover 90% of the time and 
mutation only 10%. At least one of these values must be nonzero. 
<P><B>Autosave Frequency</B> controls how often the current population is 
automatically saved to the <CODE>data</CODE> file in case of power failure or 
other external interruption. The default value of 100 saves every 100 
generations. A value of 1 would save every generation, 0 would turn off autosave 
altogether. 
<P><B>Log Frequency</B> controls how often entries are written to the 
<CODE>log</CODE> file. The default value of 1 writes a log entry every 
generation. A value of 10 would log every 10 generations (suitable for runs with 
a small population for very many generations), 0 would turn off logging. 
<P>The parameter values are read from a file called <CODE>params</CODE> if it is 
present, otherwise the following defaults are used: 
<P><PRE>[Population]            100
[Max Size]              1000
[Max Memory]            1000
[Max Time]              10000
[Max Moves]             1000
[Overselection Rate]    2
[Tournament Size]       4
[Crossover Rate]        50
[Mutation Rate]         50
[Autosave Frequency]    100
[Log Frequency]         1
</PRE>
<P>This is the format used, so creating a <CODE>params</CODE> file and inserting 
the above into it will keep the defaults; individual entries can then be 
changed. Note that if the file is present at all, it must have all the entries 
in this exact order. 
<P><A name="The next generation">
<H3>The next generation</H3></A>
<P>When all the individuals in a generation have been evaluated for fitness, the 
program chooses some of them to be transmitted to the next generation. Taking 
the default values of <I>Population</I> = 100, <I>Overselection Rate</I> = 2 and 
<I>Tournament Size</I> = 4, the procedure is as follows: 
<P>
<OL>
  <LI>Fill the first 2 slots of the next generation with the 2 best individuals 
  of this one. 
  <LI>Fill each of the other 98 slots with an offspring of one or two current 
  individuals. </LI></OL>
<P>To fill a slot: 
<P>
<OL>
  <LI>Choose a parent by tournament selection. 
  <LI>Decide whether to use crossover or mutation according to the <I>Crossover 
  Rate</I> and <I>Mutation Rate</I> parameters. 
  <LI>If mutation, fill the slot with a mutated version of the parent. 
  <LI>If crossover, choose another parent by tournament selection, and fill the 
  slot with an offspring based on a combination of the parents' codes. </LI></OL>
<P>To choose a parent by tournament selection: 
<P>
<OL>
  <LI>Choose 4 individuals at random. 
  <LI>Select the most fit of those 4. </LI></OL>
<P>To mutate an individual: 
<P>
<OL>
  <LI>Choose at random whether to perform insertion, substitution or deletion 
  (equal probabilities, except if the individual is of zero length then only 
  insertion can be performed; if of length equal to <I>Max Size</I> then 
  insertion cannot be performed). 
  <LI>If insertion, choose an insertion point (between any two adjacent 
  instructions, or at the start or end, equal probability for each point) and 
  insert a random instruction there. 
  <LI>If substitution, choose an instruction and change it at random. (1 in 30 
  chance of changing it to the same instruction, i.e. leaving it unchanged.) 
  <LI>If deletion, choose an instruction and delete it. 
  <LI>Flip a coin; if it comes up heads, go back to step 1. (So usually only one 
  or two instructions will be mutated, but in theory any number could be.) 
</LI></OL>
<P>To cross over two individuals: 
<P>
<OL>
  <LI>Choose a break point in each individual. 
  <LI>Copy the first individual's code up to its break point, then copy the 
  second individual's code from its break point on. </LI></OL>
<P>To choose a break point: 
<P>
<OL>
  <LI>The start and end are valid break points. 
  <LI>Every point between a label and a nonlabel instruction is also valid. 
  (Labels are explained under <A 
  href="http://www.esatclear.ie/~rwallace/lithos.html#Control flow">Control 
  flow</A>; the theory is that code should get spliced at reasonable breaks 
  between functional units. Informal eyeballing of debugging output suggests 
  this works fairly often.) 
  <LI>Choose a valid break point at random. </LI></OL>
<P>When all the slots in the population have been filled, the process of 
evaluating all the individuals for fitness begins again. 
<P><A name="The log file">
<H3>The log file</H3></A>
<P>The <CODE>log</CODE> file has columns for the following values: 
<P><B>Generation:</B> The current generation number. 
<P><B>Complexity:</B> The size of the most fit individual. 
<P><B>Diversity:</B> The number of "subspecies" in the population, where two 
programs belong to the same subspecies if their first and last instructions are 
equal. (Zero length programs are ignored in this count, thus the maximum 
possible value is 30 * 30 = 900. A crude measure, but simple to define and cheap 
to compute.) 
<P><B>Score:</B> A measure of the performance of the most fit individual at the 
task. For games, it's the number of points scored by that individual when 
playing against the second most fit one. 
<P>The columns are tab separated so the file can easily be loaded into a 
spreadsheet for plotting graphs. 
<P><A name="The virtual machine">
<H2>The virtual machine</H2></A>
<P>Lithos uses a stack based virtual machine. A program within it consists of a 
sequence of instructions, normally executed one after the other; most 
instructions take their inputs from the stack and push their outputs onto it. 
<P>The virtual memory is an array of words. Taking the default value of <I>Max 
Memory</I> = 1000, memory addresses go from 0 to 999. Inputs are placed at the 
bottom of memory - for the game of Go, words 0 to 382 are initialized to the 
current state of the game, with the rest being zero. 
<P>Each word contains an integer, 32 bits on typical hardware. (Or in general, 
whatever the C compiler decides an <CODE>int</CODE> is. Note that 
<I>Population</I> * <I>Max Size</I> cannot exceed the range of an 
<CODE>int</CODE>; in practice, this means that the total size of all the VM 
programs cannot exceed 2 gigabytes, which is a restriction that 32 bit machines 
would impose anyway.) Thus, VM programs can directly handle, on typical systems, 
numbers in the range of approximately -2 billion to +2 billion. 
<P>The stack grows from the top down and is initially empty. It wraps around on 
overflow or underflow. So if the first instruction is <CODE>CONST1</CODE>, the 
value 1 will be placed in location 999. If the first instruction is 
<CODE>ADD</CODE>, the stack will underflow so the input words in locations 0 and 
1 will be added together and the result will be placed in location 1. (Evolved 
programs quite often exploit this.) 
<P>Stack words are left unchanged unless explicitly overwritten, so in the above 
<CODE>ADD</CODE> example, location 0 will retain its original contents. 
<P>When a program terminates (either by executing its last instruction or by 
staying in a loop and timing out after <I>Max Time</I> instructions), whatever 
it has left on top of the stack is taken as its output. (Because of wraparound, 
this means that a null program will effectively echo its input - the first words 
of the input will be "on top" of the stack.) 
<P>While a single memory space is used for input, data stack and subroutine 
return addresses, it is not used for program code. This is in a separate memory 
area, and programs have no way to directly access their own code. 
<P><A name="The instruction set">
<H3>The instruction set</H3></A>
<P>There are 30 instructions, each consisting of an opcode only (no immediate 
operands). In the table below, the inputs are taken from the stack, pushed in 
the order given (i.e. the last operand is on top of the stack) and the outputs 
are pushed onto the stack. 
<P>
<TABLE border=1>
  <TBODY>
  <TR>
    <TH>Instruction</TH>
    <TH>Inputs</TH>
    <TH>Outputs</TH>
    <TH>Description</TH></TR>
  <TR>
    <TD colSpan=4>Numbers</TD></TR>
  <TR>
    <TD><CODE>CONST0</CODE></TD>
    <TD></TD>
    <TD><CODE>0</CODE></TD>
    <TD>Constant 0</TD></TR>
  <TR>
    <TD><CODE>CONST1</CODE></TD>
    <TD></TD>
    <TD><CODE>1</CODE></TD>
    <TD>Constant 1</TD></TR>
  <TR>
    <TD><CODE>RANDOM</CODE></TD>
    <TD></TD>
    <TD><CODE>random(0..1)</CODE></TD>
    <TD>Random number, either 0 or 1</TD></TR>
  <TR>
    <TD colSpan=4>Arithmetic</TD></TR>
  <TR>
    <TD><CODE>INC</CODE></TD>
    <TD><CODE>x</CODE></TD>
    <TD><CODE>x + 1</CODE></TD>
    <TD>Increment</TD></TR>
  <TR>
    <TD><CODE>DEC</CODE></TD>
    <TD><CODE>x</CODE></TD>
    <TD><CODE>x - 1</CODE></TD>
    <TD>Decrement</TD></TR>
  <TR>
    <TD><CODE>ADD</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x + y</CODE></TD>
    <TD>Addition</TD></TR>
  <TR>
    <TD><CODE>SUB</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x - y</CODE></TD>
    <TD>Subtraction</TD></TR>
  <TR>
    <TD><CODE>MUL</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x * y</CODE></TD>
    <TD>Multiplication</TD></TR>
  <TR>
    <TD><CODE>DIV</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x / y</CODE></TD>
    <TD>Division</TD></TR>
  <TR>
    <TD colSpan=4>Comparison</TD></TR>
  <TR>
    <TD><CODE>EQ</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x == y</CODE></TD>
    <TD>Equal</TD></TR>
  <TR>
    <TD><CODE>NE</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x != y</CODE></TD>
    <TD>Not equal</TD></TR>
  <TR>
    <TD><CODE>LT</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x &lt; y</CODE></TD>
    <TD>Less than</TD></TR>
  <TR>
    <TD><CODE>GT</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x &gt; y</CODE></TD>
    <TD>Greater than</TD></TR>
  <TR>
    <TD><CODE>LE</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x &lt;= y</CODE></TD>
    <TD>Less than or equal</TD></TR>
  <TR>
    <TD><CODE>GE</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x &gt;= y</CODE></TD>
    <TD>Greater than or equal</TD></TR>
  <TR>
    <TD colSpan=4>Logic</TD></TR>
  <TR>
    <TD><CODE>AND</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x and y</CODE></TD>
    <TD>And</TD></TR>
  <TR>
    <TD><CODE>OR</CODE></TD>
    <TD><CODE>x, y</CODE></TD>
    <TD><CODE>x or y</CODE></TD>
    <TD>Or</TD></TR>
  <TR>
    <TD><CODE>NOT</CODE></TD>
    <TD><CODE>x</CODE></TD>
    <TD><CODE>not x</CODE></TD>
    <TD>Not</TD></TR>
  <TR>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线观看| 久久久一区二区三区捆绑**| 欧美一区二区三区爱爱| 日本一区二区三区久久久久久久久不| 亚洲自拍偷拍综合| 丁香婷婷综合色啪| 日韩一区二区高清| 一卡二卡欧美日韩| 成人激情免费网站| 日韩一区二区三区免费观看| 亚洲图片欧美综合| 成人av电影在线观看| www激情久久| 免费成人av在线| 91福利在线观看| 亚洲视频一区在线| 国产.欧美.日韩| 26uuu欧美日本| 美女国产一区二区三区| 在线不卡欧美精品一区二区三区| 亚洲欧洲无码一区二区三区| 国产suv精品一区二区883| 日韩欧美高清一区| 免费观看久久久4p| 欧美日韩成人一区二区| 亚洲二区视频在线| 欧美在线观看视频一区二区三区| 最新日韩在线视频| caoporn国产一区二区| 中文字幕av一区二区三区免费看| 狠狠v欧美v日韩v亚洲ⅴ| 日韩免费视频一区| 麻豆视频观看网址久久| 日韩视频在线观看一区二区| 日日夜夜免费精品| 91精品国产综合久久精品app| 亚洲成人动漫av| 3d动漫精品啪啪1区2区免费 | 精品乱码亚洲一区二区不卡| 日韩精品福利网| 91精品国产一区二区三区香蕉| 无码av免费一区二区三区试看| 欧美日韩精品免费观看视频| 亚洲影视在线播放| 91精品午夜视频| 黄网站免费久久| 国产欧美一区在线| va亚洲va日韩不卡在线观看| 亚洲人成亚洲人成在线观看图片| 一本久久精品一区二区| 午夜精品福利在线| 日韩欧美国产精品一区| 国产精品自拍在线| 亚洲欧美中日韩| 欧美日韩在线播放三区四区| 捆绑调教美女网站视频一区| 久久午夜老司机| 91在线码无精品| 天天综合天天做天天综合| 日韩欧美123| 成人天堂资源www在线| 亚洲综合在线免费观看| 欧美一级生活片| 国产suv精品一区二区883| 夜夜揉揉日日人人青青一国产精品| 欧美日韩中文一区| 久久se这里有精品| 日韩理论片网站| 日韩欧美亚洲国产另类| 99久久精品一区二区| 亚洲国产精品影院| 国产欧美一区二区精品仙草咪| 日本韩国一区二区三区| 狠狠狠色丁香婷婷综合久久五月| 中文字幕一区日韩精品欧美| 7777精品伊人久久久大香线蕉的 | 国产成人精品一区二区三区网站观看| 中文字幕综合网| 精品少妇一区二区三区在线视频| 99久久亚洲一区二区三区青草| 日韩成人午夜精品| 国产精品久久午夜| 日韩亚洲电影在线| 色婷婷av一区二区三区软件| 黑人巨大精品欧美黑白配亚洲| 亚洲一区二区三区中文字幕| 久久久久久夜精品精品免费| 欧美日韩国产天堂| 成人在线视频一区二区| 蜜桃精品在线观看| 亚洲成人高清在线| 亚洲精品乱码久久久久久| 久久噜噜亚洲综合| 日韩精品在线看片z| 91久久精品一区二区三| 国产999精品久久久久久绿帽| 丝袜美腿亚洲综合| 亚洲精品成人悠悠色影视| 国产欧美精品一区aⅴ影院| 欧美一区二区成人| 欧美视频精品在线| 色欧美片视频在线观看| 不卡的av中国片| 成人av资源站| 成人涩涩免费视频| 国产成人超碰人人澡人人澡| 精油按摩中文字幕久久| 日韩精品欧美成人高清一区二区| 亚洲一区二区三区精品在线| 一区二区三区四区在线免费观看| 国产精品理论在线观看| 国产精品日产欧美久久久久| 国产夜色精品一区二区av| 欧美zozo另类异族| 精品成人免费观看| 久久色成人在线| 久久在线免费观看| 国产欧美日产一区| 国产无人区一区二区三区| 久久噜噜亚洲综合| 欧美激情在线一区二区三区| 久久美女艺术照精彩视频福利播放| 日韩亚洲欧美在线| www亚洲一区| 欧美国产精品一区二区三区| 国产精品国产三级国产普通话蜜臀| 国产精品美女久久久久aⅴ国产馆| 国产欧美一二三区| 国产精品黄色在线观看| 亚洲精品日韩一| 亚洲高清免费在线| 看片网站欧美日韩| 国产高清久久久久| 成人高清视频在线| 色婷婷久久综合| 欧美一区二区精品在线| 久久久精品影视| 成人欧美一区二区三区白人| 亚洲综合精品久久| 美女精品自拍一二三四| 国产成人亚洲精品狼色在线| 一本大道久久a久久精品综合| 精品视频999| 久久欧美一区二区| 亚洲区小说区图片区qvod| 亚洲18影院在线观看| 国产一区二区三区| 91丝袜美女网| 欧美一区二区在线不卡| 久久久久九九视频| 亚洲女人的天堂| 美女国产一区二区三区| 91免费版pro下载短视频| 678五月天丁香亚洲综合网| 26uuu国产日韩综合| 亚洲黄色性网站| 国产麻豆成人精品| 欧美性猛片xxxx免费看久爱| 2023国产精华国产精品| 日韩伦理免费电影| 国产一区二三区好的| 欧美亚洲动漫精品| 中文字幕欧美激情一区| 日韩国产在线观看| 99国产精品久久久| 久久先锋影音av鲁色资源| 一区二区三区日韩欧美| 韩国精品久久久| 欧美日韩免费观看一区三区| 国产欧美日韩在线观看| 日韩av中文字幕一区二区| 91片黄在线观看| 精品国产乱码久久久久久夜甘婷婷 | 久久久99精品免费观看| 午夜婷婷国产麻豆精品| av中文一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲一卡二卡三卡四卡无卡久久| 福利一区二区在线| 91精品国产综合久久精品| 一区二区三区欧美日韩| 成人h动漫精品| 国产性天天综合网| 麻豆精品久久久| 7777精品伊人久久久大香线蕉完整版 | 亚洲激情图片qvod| 成人av在线播放网站| 欧美精品一区在线观看| 午夜电影网一区| 欧美日韩亚洲综合一区二区三区| 亚洲视频电影在线| 成a人片国产精品| 国产欧美精品一区| 成人综合日日夜夜| 国产精品私人自拍| 高清在线不卡av| 欧美国产日本视频| 风间由美一区二区三区在线观看 | 欧美高清在线一区| 粉嫩av一区二区三区在线播放|