Older Version Newer Version

GerdIsenberg GerdIsenberg Mar 25, 2015

**[[Home]] * [[Engines]] * SOMA**
|| [[image:soma.JPG width="366" height="218" link="http://en.wikipedia.org/wiki/Perikaryon"]] ||~   || **SOMA**,
the //**S**mith **O**ne-**M**ove **A**nalyzer//, a chess program designed as one-ply analyzing "paper machine" by [[http://en.wikipedia.org/wiki/Evolutionary_biologist|evolutionary biologist]] [[John Maynard Smith]] in the early 60s as a challenger to [[Machiavelli]], of whose method of working he was in ignorance. Similar to their predecessors from the late 40s, [[Turochamp]] by [[Alan Turing]] and [[David Champernowne]], and Machiavelli by [[Donald Michie]] and [[Shaun Wylie]], SOMA looks one [[Ply|ply]] ahead, to do a static [[Evaluation|evaluation]] of all [[Leaf Node|leaf-positions]] to choose the [[Moves|move]] which maximizes the evaluation [[Score|score]], considering [[Material|material]], [[Center Control|center]]- and [[King Safety#SquareControl|neighboring king square control]]. Since there was no [[Quiescence Search|quiescence search]], [[Static Exchange Evaluation|swap-off values]] were used to determine own and opponent pieces [[En prise|en prise]], and to modify the evaluation score accordantly.  ||
|| Structure of a typical [[http://en.wikipedia.org/wiki/Neuron|neuron]] <ref>[[http://en.wikipedia.org/wiki/Perikaryon|Perikaryon from Wikipedia]]</ref> ||~   ||^   ||
[[toc]]
=Features= 
[[John Maynard Smith|John Maynard Smith's]] and [[Donald Michie|Donald Michie's]] description of SOMA's evaluation features and weights from their [[Timeline#1961|1961]] paper //Machines that play games//, excerpt <ref>[[John Maynard Smith]], [[Donald Michie]] (**1961**). //Machines that play games//. [[http://en.wikipedia.org/wiki/New_Scientist|New Scientist]], 12, 367-9. [[http://books.google.com/books?id=lo7r0zX_T0sC&lpg=PA369&dq=Machines%20that%20play%20games.%201961%2C%20New%20Scientist%2C%2012&pg=PA367#v=onepage&q&f=false|google books]]</ref> :
|| {{We will suppose that SOMA is playing the white pieces. All White's legal moves are considered in turn, and the value of White's position after each is calculated; the move played is that which maximizes this value. In calculating the value of a position, the following factors are taken into account:}} ||
[[#Material]]
==Material== 
|| (i) {{The [[Point Value|value]] of White's pieces minus the value of Black's pieces, where P=10, Kt=B=30, R=50, Q=90, K=1,000.}} ||
[[#SquareControl]]
==Square Control== 
|| (ii) {{The value of the squares "attacked" by White's pieces. A typical square scores 1, one of the four central squares 2, and a square adjacent to the Black King 3. Each White piece is considered in turn, and the value of the squares to which that piece might legally move (whether or not that square is occupied by a piece) added up. Thus an opening move of e4 increases the value by 8 (4 new squares attacked by the Bishop, 3 by the Queen, plus 1 because the Pawn now attacks a central square). Three other opening moves, e3, Nf3, Nc3, also score plus 8, and no more scores more. In such cases SOMA decides by tossing a coin.}} ||
[[#Swapoff]]
==Swap-off Value== 
|| (iii) {{The expected gain or loss if pieces en prise are captured. SOMA first calculates the "swap-off value" S for each piece, Black or White, which is en prise. S is a simple function of the value of the piece itself and of those which attack or defend it; it represents what the owner of the piece would lose if both players behaved efficiently. Thus a White Knight defended by a Pawn and attacked by a Knight and a Bishop has S=30-30+10=10 (White loses a Knight and Pawn for a Knight), whereas a White Pawn defended by a Pawn and attacked by a Knight has S=0, because Black would not make the capture. S is necessarily zero or positive.}}

{{If only one Black piece en prise has a positive value S, White adds 5 to the value of his position. For suppose a Black Queen is attacked by a Pawn, it would be wrong to credit White with the full 90 points, since Black will almost certainly move his Queen, but White does score 5 for having the "initiative". If two or more Black pieces are en prise with positive value of S, White adds the second highest value of S, plus 5 for every other positive value; this supposes that Black will move the piece with the highest S.}}

{{For the White pieces en prise, SOMA subtracts from the value of his position the highest value of S, plus 5 for every other White piece with a positive value of S.}}

{{These rules concerning pieces en prise sound more complicated than they are. They ensure that SOMA will move or defend any White piece which Black can capture with advantage, that he will harry his opponent's pieces (+5 for initiative), and that he will fork his opponent of the opportunity arises, but they do not enable him to foresee a fork by his opponent. The effect of these rules in a more complex position is explained in the [[SOMA#note23|note]] to move 23 below.}} ||

==Misc== 
|| {{In addition to these three main items, the value of the pieces, the squares attacked and the expected gains and losses from swapping off, SOMA has rules which encourage [[Castling|castling]], which discourage him from leaving pieces where they can be threatened by an opponent's pawn advance, and which enable him to allow for the fact that one of his pieces is [[Pin|pinned]].}}

{{Except for the occasional need to toss a coin, SOMA's next move is determined by the results of a rigidly defined calculation, which could in principle performed by a computer. A single move takes a human about five minutes to calculate. Machiavelli works along similar lines, but has more instructions concerning the strategical value of his position, and rather less tactical insight.}} ||

=SOMA - Machiavelli=
Following game between SOMA and [[Machiavelli]] was played, with the conclusion that it seems unlikely that a one-ply analyzer would beat any but the most inexperienced human player.
[[code]]
[Event "?"]
[Site "?"]
[Date "1961.??.??"]
[Round "?"]
[White "SOMA"]
[Black "Machiavelli"]
[Result "1/2-1/2"]

1.e3 e5 2.d4 Nc6 3.Nc3 d5 4.Nf3 e4 5.Ne5 Bb4 6.Nxc6 bxc6 7.Bd2 Nf6 8.a3 Bd6 9.h4
Bg4 10.Be2 Qd7 11.O-O O-O-O 12.f3 Bf5 13.fxe4 Bxe4 14.Ba6+ Kb8 15.Nxe4 Nxe4 16.Qe2
Qe6 17.Ba5 Ng3 18.Qf3 Nxf1 19.Rxf1 f6 20.Rd1 Qe4 21.Qxe4 dxe4 22.d5 cxd5 23.Rxd5
{diagram} Be5 24.Rb5+ Ka8 25.Bb7+ Kb8 26.Bxe4+ Kc8 27.Bf5+ Rd7 28.Bxd7+ Kxd7
1/2-1/2 {agreed}
[[code]]
> [[image:http://webchess.freehostia.com/diag/chessdiag.php?fen=1k1r3r/p1p3pp/B2b1p2/B2R4/4p2P/P3P3/1PP3P1/6K1%20b%20-%20-&size=large&coord=yes&cap=no&stm=yes&fb=no&theme=classic&color1=E3CEAA&color2=635147&color3=000000 caption="1k1r3r/p1p3pp/B2b1p2/B2R4/4p2P/P3P3/1PP3P1/6K1 b - - 0 23"]]
[[#note23]]
|| {{Machiavelli misses 23... Bh2+ 24. Kxh2 Rxe5, SOMA would have played this move. After Bh2+ there would be two white pieces en prise, the King and Rook, with S=1,000 and S=50, for which SOMA playing Black, would score +55; there would be one Black piece, the Bishop en prise, with S=30, for which SOMA would score -30. So, apart from the value of squares attacked, the move would score 25, which is more than any other.}} ||
[[#SOMAALGO]] 
=SOMA Algorithm=
Based on the program's name with its swap-off feature, SOMA has become an acronym for //**S**wapping **O**ff **M**aterial **A**nalyzer//, as a statical analysis of all possible capture-move sequences <ref>[[Hiroyuki Iida]], [[Makoto Sakuta]], [[Jeff Rollason]] (**2002**). //Computer Shogi//. Artificial Intelligence, Vol. 134, [[http://en.wikipedia.org/wiki/Elsevier|Elsevier]], [[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.130.2727|CiteSeerX]]</ref>. Some early chess programs had no [[Quiescence Search|quiescence search]] but performed a SOMA like [[Static Exchange Evaluation|exchange evaluation]], for instance [[Schach (US)|Schach]], [[Coko]], [[Schach MV 5,6]], early [[Sargon]] <ref>[[Dan Spracklen]], [[Kathe Spracklen]] (**1978**). //[[https://archive.org/stream/byte-magazine-1978-11/1978_11_BYTE_03-11_The_Sky_is_the_Limit#page/n17/mode/2up|An Exchange Evaluator for Computer Chess]]//. [[Byte Magazine#BYTE311|BYTE, Vol. 3, No. 11]]</ref> and [[Rebel]] versions <ref>[[http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=286050&t=28775|Re: SOMA]] by [[Ed Schroder|Ed Schröder]], [[CCC]], August 12, 2009</ref>, and notably programs by [[Richard Lang]] <ref>[[http://www.chesscomputeruk.com/Richard_Lang_Q_A.pdf|Richard Lang - Question & Answer Interview given to a German magazine in 2003]], pdf hosted by [[Mike Watters]], [[http://www.chesscomputeruk.com/index.html|Chess Computer UK]]</ref> and [[Jeff Rollason]]. [[Dan Spracklen|Dan]] and [[Kathe Spracklen]] <ref>[[Dan Spracklen]], [[Kathe Spracklen]] (**1978**). //First Steps in Computer Chess Programming//. [[Byte Magazine#BYTE310|BYTE, Vol. 3, No. 10]], [[http://archive.computerhistory.org/projects/chess/related_materials/text/4-4.First_Steps.Byte_Magazine/First_Steps_in_Computer_Chess_Programing.Spracklen-Dan_Kathe.Byte_Magazine.Oct-1978.062303035.sm.pdf|pdf]] from [[The Computer History Museum]]</ref> credit [[Donald Michie]] and his 1974 book //On Machine Intelligence// <ref>[[Donald Michie]] (**1974**). //On Machine Intelligence//. Edinburgh: University Press, ISBN 10: 085224262X, ISBN 13: 9780852242629,  [[http://www.abebooks.com/servlet/SearchResults?isbn=085224262X|abebooks.com]], [[http://www.alibris.com/search/books/qwork/4836304/used/On%20machine%20intelligence|alibris.com]], [[http://www.biblio.com/isbn/9780852242629.html|biblio.com]]</ref> as a reference:
|| {{Michie's book provides an excellent treatment of exchange evaluation. He uses the concept of a exchange polynomial for accurately determining the outcome of battles engaged on the board. The basic approach we used in XCHNG}} <ref>[[http://www.andreadrian.de/schach/sargon.asm|Sargon Z80 assembly listing]] by [[Dan Spracklen|Dan]] and [[Kathe Spracklen]], hosted by [[Andre Adrian]], see XCHNG</ref>, {{the Sargon exchange evaluator, turned out to be surprisingly similar. Sargon's approach, however, is far less computationally complex. We highly recommend this reference to anyone plannig to write a chess program without look-ahead.}} ||

In the domain of [[Shogi|Computer Shogi]], [[Jeff Rollason]] proposed an algorithm called SUPER-SOMA <ref>[[Jeff Rollason]] (**2000**). //[[http://link.springer.com/chapter/10.1007/3-540-45579-5_19|SUPER-SOMA - Solving Tactical Exchanges in Shogi without Tree Searching]]//. [[CG 2000]], [[http://www.aifactory.co.uk/downloads/SUPER-SOMA.doc|Word preprint]]</ref>, an enhanced SOMA algorithm with Shogi-specific features <ref>[[Jeff Rollason]] (**2006**). //[[http://www.aifactory.co.uk/newsletter/2006_03_quiescence_alts.htm|Looking for Alternatives to Quiescence Search]]//. [[AI Factory]], Autumn 2006</ref>. 

=See also=
* [[Various Classifications#Acronym|Acronym]]
* [[Attack and Defend Maps#EDsLookup|Ed's Lookup]] from [[Attack and Defend Maps]]
* [[Machiavelli]]
* [[MVV-LVA]]
* [[SEE - The Swap Algorithm]]
* [[Static Exchange Evaluation]]
* [[Helmut Richter#Swapoff|Swap-off]] by [[Helmut Richter]]
* [[Turochamp]]

=Publications= 
* [[John Maynard Smith]], [[Donald Michie]] (**1961**). //Machines that play games//. [[http://en.wikipedia.org/wiki/New_Scientist|New Scientist]], 12, 367-9. [[http://books.google.com/books?id=lo7r0zX_T0sC&lpg=PA369&dq=Machines%20that%20play%20games.%201961%2C%20New%20Scientist%2C%2012&pg=PA367#v=onepage&q&f=false|google books]]
* [[Donald Michie]] (**1966**). //Game Playing and Game Learning Automata.// Advances in Programming and Non-Numerical Computation, [[http://en.wikipedia.org/wiki/Leslie_Fox|Leslie Fox]] (ed.), pp. 183-200. Oxford, Pergamon. Includes Appendix: //Rules of SOMAC// by [[John Maynard Smith]] <ref>see [[Helmut Richter#Swapoff|Swap-off]] by [[Helmut Richter]]</ref>
* [[Donald Michie]] (**1974**). //On Machine Intelligence//. Edinburgh: University Press, ISBN 10: 085224262X, ISBN 13: 9780852242629,  [[http://www.abebooks.com/servlet/SearchResults?isbn=085224262X|abebooks.com]], [[http://www.alibris.com/search/books/qwork/4836304/used/On%20machine%20intelligence|alibris.com]], [[http://www.biblio.com/isbn/9780852242629.html|biblio.com]]
* [[Dan Spracklen]], [[Kathe Spracklen]] (**1978**). //[[https://archive.org/stream/byte-magazine-1978-11/1978_11_BYTE_03-11_The_Sky_is_the_Limit#page/n17/mode/2up|An Exchange Evaluator for Computer Chess]]//. [[Byte Magazine#BYTE311|BYTE, Vol. 3, No. 11]]
* [[Jeff Rollason]] (**2000**). //[[http://link.springer.com/chapter/10.1007/3-540-45579-5_19|SUPER-SOMA - Solving Tactical Exchanges in Shogi without Tree Searching]]//. [[CG 2000]], [[http://www.aifactory.co.uk/downloads/SUPER-SOMA.doc|Word preprint]]
* [[Hiroyuki Iida]], [[Makoto Sakuta]], [[Jeff Rollason]] (**2002**). //Computer Shogi//. Artificial Intelligence, Vol. 134, [[http://en.wikipedia.org/wiki/Elsevier|Elsevier]], [[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.130.2727|CiteSeerX]]
* [[Jeff Rollason]] (**2006**). //[[http://www.aifactory.co.uk/newsletter/2006_03_quiescence_alts.htm|Looking for Alternatives to Quiescence Search]]//. [[AI Factory]], Autumn 2006

=Forum Posts= 
* [[http://groups.google.com/group/rec.games.chess/browse_frm/thread/dd1c55ecc9f48717|Computer Chess: swap down evaluators vs capture search]] by [[Jon Dart]], [[Computer Chess Forums|rgc]], October 24, 1994 » [[Quiescence Search]]
> [[http://groups.google.com/group/rec.games.chess/msg/527be476c5dd22d1|Re: Computer Chess: swap down evaluators vs capture search]] by [[Deniz Yuret]], [[Computer Chess Forums|rgc]], October 26, 1994
* [[http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=123511&t=14168|Re: Movei added to Crafty vs Rybka comaprison data]] by [[Edsel Apostol]], [[CCC]], June 06, 2007
* [[http://www.talkchess.com/forum/viewtopic.php?t=28775|SOMA]] by [[Gerd Isenberg]], [[CCC]], July 04, 2009

=External Links= 
* [[http://en.wikipedia.org/wiki/Soma_%28disambiguation%29|Soma (disambiguation) from Wikipedia]]
* [[http://en.wikipedia.org/wiki/Soma|Soma from Wikipedia]]
* [[http://en.wikipedia.org/wiki/Perikaryon|Perikaryon from Wikipedia]]
* [[http://en.wikipedia.org/wiki/Soma_cube|Soma cube from Wikipedia]]
* [[http://en.wikipedia.org/wiki/The_Smashing_Pumpkins|The Smashing Pumpkins]] - [[http://en.wikipedia.org/wiki/Soma_%28song%29|Soma]], [[http://www.terminal5nyc.com/|Terminal 5]], October 18, 2011, [[http://en.wikipedia.org/wiki/YouTube|YouTube]] Video
> [[media type="custom" key="24676356"]]

=References= 
<references />
=What links here?= 
[[include page="SOMA" component="backlinks" limit="40" ]]
**[[Engines|Up one Level]]**