<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2659536140499105799</id><updated>2012-02-16T13:04:26.883-08:00</updated><category term='license'/><category term='selections'/><category term='dependency injection'/><category term='guice'/><category term='cilib'/><category term='documentation'/><category term='functional'/><category term='core'/><title type='text'>Perform iteration: Learn -&gt; Understand</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-4981138193819677236</id><published>2010-08-09T08:52:00.000-07:00</published><updated>2010-08-09T09:02:03.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='core'/><category scheme='http://www.blogger.com/atom/ns#' term='dependency injection'/><category scheme='http://www.blogger.com/atom/ns#' term='cilib'/><title type='text'>Redesign of CIlib core for 0.8 release</title><content type='html'>The release of CIlib 0.7.5 will be out soon. We anticipate that this will be the last release of the 0.7.x series of CIlib and work will begin on the new 0.8.x series soon.&lt;br /&gt;&lt;br /&gt;With 0.8, a few (large) changes will happen to the core CIlib library. Firstly, we are decoupling the simulator from the library completely. This means that the core library will be exactly that, a core library. Some design desicions made in the past are coming back to haunt us, so we'd rather just fix the problem instead of making it a known issue and living with it.&lt;br /&gt;&lt;br /&gt;Additionally, the objects in CIlib currently know far too much about the objects they use etc. The core will migrate to use dependency injection (the hollywood principle) so that:&lt;ol&gt;&lt;li&gt;Testability will be a primary concern.&lt;/li&gt;&lt;li&gt;Lots of redundant code will disappear.&lt;/li&gt;&lt;li&gt;The cleanup will mean better code for the users of the library.&lt;/li&gt;&lt;/ol&gt;I encourage you to chat to us on the mailing list about these changes, they are long overdue and I'm looking forward to making the changes which will mean a better library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-4981138193819677236?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/4981138193819677236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2010/08/redesign-of-cilib-core-for-08-release.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/4981138193819677236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/4981138193819677236'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2010/08/redesign-of-cilib-core-for-08-release.html' title='Redesign of CIlib core for 0.8 release'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-5876384842462576208</id><published>2010-07-29T22:46:00.000-07:00</published><updated>2010-07-29T22:52:49.766-07:00</updated><title type='text'>Why I hate XML with more ferocity than a rabid dog</title><content type='html'>Right, so.... XML.&lt;br /&gt;&lt;br /&gt;Yet another technology that has been misused and abused by the world. It's got it's uses, sure, but they are mainly directed to storing data for transfer between unrelated external entities.&lt;br /&gt;&lt;br /&gt;Now, using XML just "because" is a silly idea. Period. I have never understood why people want to use XML when a plain text file can achieve the same effect. Processing and parsing XML with the libraries of today is terribly painful, I don't think anybody can argue with that. Some tools make it simpler, yes, but the verbosity of the representation results in far too many complications. Now add a schema into the mix and you will have a melting pot of things that should not exist in reality.&lt;br /&gt;&lt;br /&gt;I hope this XML fad disappears sooner rather than later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-5876384842462576208?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/5876384842462576208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2010/07/why-i-hate-xml-with-more-ferocity-than.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/5876384842462576208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/5876384842462576208'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2010/07/why-i-hate-xml-with-more-ferocity-than.html' title='Why I hate XML with more ferocity than a rabid dog'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-7331468858638844969</id><published>2010-05-17T10:57:00.000-07:00</published><updated>2010-05-17T11:00:45.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='license'/><category scheme='http://www.blogger.com/atom/ns#' term='cilib'/><title type='text'>License updates</title><content type='html'>After receiving numerous requests to have the default license of CIlib altered, we have changed the license to the LGPL from the GPL.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This change should result in our users linking to the library much more simply. Well, that's about that. Head on over to the &lt;a href="http://www.cilib.net"&gt;website&lt;/a&gt; and the &lt;a href="http://forums.cilib.net"&gt;forums&lt;/a&gt; for more info.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-7331468858638844969?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/7331468858638844969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2010/05/license-updates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/7331468858638844969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/7331468858638844969'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2010/05/license-updates.html' title='License updates'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-4479356892589472320</id><published>2010-05-16T08:47:00.000-07:00</published><updated>2010-05-16T08:57:09.310-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional'/><category scheme='http://www.blogger.com/atom/ns#' term='cilib'/><title type='text'>Getting functional</title><content type='html'>Recently, I've been doing some work in other languages such as Python. I must say, after the initial annoyance, the languages have become rather pleasant to use.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The biggest benefit was the ability to quickly get complex movements of data performed with very little effort in terms of the amount of code that I needed to write. The "functional" way as it were is, in one word, fantastic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The paradigm advocates immutability (which I absolutely agree with) and concise statements whereby boilerplate code is kept to an absolute minimum. As a result of this, together with my enjoyment of Java has spurred me on to start learning Scala, the best of both worlds as it were. By learning a new language, I hope to improve the APIs available in CIlib. Such improvements will ensure that we focus on the intentions of the algorithms etc and not get bogged down with the implementation related difficulties.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'd love to one day write concise statements like:&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;topology.foreach(calculateFitness)&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-4479356892589472320?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/4479356892589472320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2010/05/getting-functional.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/4479356892589472320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/4479356892589472320'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2010/05/getting-functional.html' title='Getting functional'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-2622392453385917626</id><published>2009-11-03T04:52:00.000-08:00</published><updated>2009-11-03T05:09:36.195-08:00</updated><title type='text'>Slowness? Nope. Just writing up.</title><content type='html'>It's been a while since I wrote something about of the stuff I'm up to. Currently, finalizing my MSc dissertation is taking priority, but I'll be back to hacking away on some CIlib code soon enough.&lt;br /&gt;&lt;br /&gt;The main topics at the moment are the need to correctly fix some of the measurement APIs within the library and of course the pending refactor for dependency injection. Feel free to add some issues (if you have any) at the &lt;a href="http://code.google.com/p/cilib"&gt;CIlib Google Code page.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the meantime, here are some links to my more favored blogs:&lt;ul&gt;&lt;li&gt;&lt;a href="http://googletesting.blogspot.com/"&gt;Google Testing&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://misko.hevery.com/"&gt;Misko Hevery&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;That should keep you busy :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-2622392453385917626?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/2622392453385917626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2009/11/slowness-nope-just-writing-up.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/2622392453385917626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/2622392453385917626'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2009/11/slowness-nope-just-writing-up.html' title='Slowness? Nope. Just writing up.'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-780474661335136772</id><published>2009-09-26T23:44:00.001-07:00</published><updated>2009-09-26T23:49:52.893-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='core'/><category scheme='http://www.blogger.com/atom/ns#' term='guice'/><category scheme='http://www.blogger.com/atom/ns#' term='dependency injection'/><category scheme='http://www.blogger.com/atom/ns#' term='cilib'/><title type='text'>Bootstrapping, the new frontier</title><content type='html'>Bootstrapping CIlib is providing some interesting challenges.&lt;br /&gt;&lt;br /&gt;We need to have a selection of predefined bindings and then have them dynamically overridden when needed. This is only on the specification usage of CIlib, so the API usage will remain relatively unchanged (for the moment - some setters might be removed in future versions)&lt;br /&gt;&lt;br /&gt;To address these issues, we have written some interesting code to get the overrides working correctly. This is still very much a work in progress, but I feel we are on the right track at least.&lt;br /&gt;&lt;br /&gt;Nothing is set in stone at the moment, but the Bootstrapping API is changing a lot. It's exciting to get the new framework up and running :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-780474661335136772?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/780474661335136772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2009/09/bootstrapping-new-frontier.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/780474661335136772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/780474661335136772'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2009/09/bootstrapping-new-frontier.html' title='Bootstrapping, the new frontier'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-5602919382327080753</id><published>2009-08-25T07:57:00.000-07:00</published><updated>2009-08-25T08:35:49.263-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='core'/><category scheme='http://www.blogger.com/atom/ns#' term='guice'/><category scheme='http://www.blogger.com/atom/ns#' term='dependency injection'/><category scheme='http://www.blogger.com/atom/ns#' term='cilib'/><title type='text'>Core issues and Dependency Injection</title><content type='html'>It's something that has been a long time coming, but CIlib is in need of a little core refactoring to ensure that the code is maintainable and most importantly, testable.&lt;br /&gt;&lt;br /&gt;I've spent a long time examining the various Dependency Injection (DI) frameworks that are available and I've finally decided on using &lt;a href="http://code.google.com/p/google-guice"&gt;Guice&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The core of CIlib will rely completely on injection to get the required instances in the required places. This does, however, mean that some serious changes will be needed on the inside, but they will be changes that users will not even notice.&lt;br /&gt;&lt;br /&gt;CIlib has some static code (in the form of singleton instances and static accessors - &lt;code&gt;Algorithm.get()&lt;/code&gt;) and this will be removed to ensure that the library is what it is supposed to be.&lt;br /&gt;&lt;br /&gt;More to come on this refactoring as I get into it.&lt;br /&gt;&lt;br /&gt;Also, it's almost time to commit the missing code / algorithms :) Keep an eye out for the new Evolutionary Programming and Evolutionary Strategies algorithms that will make their way into the master branch soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-5602919382327080753?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/5602919382327080753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2009/08/core-issues-and-dependency-injection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/5602919382327080753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/5602919382327080753'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2009/08/core-issues-and-dependency-injection.html' title='Core issues and Dependency Injection'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-77570790827627731</id><published>2009-08-17T05:28:00.000-07:00</published><updated>2009-08-25T08:09:48.897-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='cilib'/><title type='text'>Moving home and keeping cool</title><content type='html'>Well, after some discussion we decided to move CIlib to the domain &lt;a href="http://www.cilib.net"&gt;cilib.net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It's sorta a blessing actually :) The new host provides us with a lot more freedom and we can install / use what we want.&lt;br /&gt;&lt;br /&gt;So, additionally to moving the website, a request was made to create a set of forums. As a result we now have some discussion forums for CIlib on the website. Feel free to head on over to &lt;a href="http://forums.cilib.net"&gt;the forums&lt;/a&gt; to create an account and get the discussion rolling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-77570790827627731?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/77570790827627731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2009/08/moving-home-and-keeping-cool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/77570790827627731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/77570790827627731'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2009/08/moving-home-and-keeping-cool.html' title='Moving home and keeping cool'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-5785511698221452009</id><published>2009-07-21T11:41:00.000-07:00</published><updated>2009-11-03T05:07:53.562-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='selections'/><category scheme='http://www.blogger.com/atom/ns#' term='cilib'/><title type='text'>Generic selection in CIlib</title><content type='html'>So, you are busy with a an algorithm and you need to apply a selection to a group of objects.&lt;br /&gt;&lt;br /&gt;Generally, you would write some code that implements a selection strategy. Class names such as TournamentSelection, RouletteWheelSelection and RandomSelection seem to be the norm. I've seen these classes many, many times. Feels like a waste doesn't it? I mean how many TournamentSelection classes should a person write in a lifetime? There has to be a better way!&lt;br /&gt;&lt;br /&gt;Well, that's what we thought as we thought about the notion of "selection" in CIlib. You may want to select a variety of things, not just specific object such as Individuals. Java generics and a nifty fluent interface come to the rescue.&lt;br /&gt;&lt;br /&gt;Fluent interfaces are interfaces that read like natural language. &lt;a href="http://en.wikipedia.org/wiki/Fluent_interface"&gt;Martin Fowler and Eric Evans&lt;/a&gt; first described this kind of API structure. The &lt;a href="http://www.jmock.org/"&gt;JMock&lt;/a&gt; guys, for example, have developed a very good API for mocking using fluent interfaces. So, how can we use this in CIlib? It's quite simple, actually.&lt;br /&gt;&lt;br /&gt;There are a few key concepts that we need to take note of regarding selection:&lt;ul&gt;&lt;li&gt;Orderings: This is related to how a list of entries can be arranged.&lt;/li&gt;&lt;li&gt;Weighing: Entries may or may not have different levels of importance.&lt;/li&gt;&lt;li&gt;Randomness: There may be a need to have a collection of entries and a set of &lt;span style="font-style: italic;"&gt;x&lt;/span&gt; random entries need to be returned.&lt;/li&gt;&lt;li&gt;Number of returned elements: One entry? Two? Twelve?&lt;/li&gt;&lt;li&gt;Should the selection be such that only unique entries are returned?&lt;/li&gt;&lt;/ul&gt;That's a bit to keep track of. Thankfully, most of the hard work has been done.&lt;br /&gt;&lt;br /&gt;Keeping the points above in mind, a TournamentSelection is actually a multi-part process. Firstly, a random sub-group of elements needs to be selected. Then from this sub-group, the elements are ordered based on some criteria and the element which is the "best" is then the winner of the tournament and should be returned as the final result for the selection. I'll be honest, it's easy to implement but what about if you want to use a different random number generator? These type of options need to be simple to define.&lt;br /&gt;&lt;br /&gt;How about a tournament selection in a one-liner:&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;Selection.from(elements)&lt;br /&gt;.orderBy(new RandomOrdering&amp;lt;E&amp;gt;(this.random))&lt;br /&gt;.last(tournamentSize)&lt;br /&gt;.orderBy(new SortedOrdering&amp;lt;E&amp;gt;(this.comparator))&lt;br /&gt;.last().singleSelect();&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Mixing the Ordering, Weighing and type of selection means that we can do some very interesting selections with what ever the selection type E might be.&lt;br /&gt;&lt;br /&gt;For more information regarding all the combinations, please have a look at the CIlib JavaDoc and documentation, or drop us an email on the mailing lists.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-5785511698221452009?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/5785511698221452009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2009/07/generic-selection-in-cilib.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/5785511698221452009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/5785511698221452009'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2009/07/generic-selection-in-cilib.html' title='Generic selection in CIlib'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2659536140499105799.post-5383697710716484472</id><published>2009-07-13T12:44:00.000-07:00</published><updated>2009-07-13T22:18:01.888-07:00</updated><title type='text'>First blog entry</title><content type='html'>I hope this blog will help keep people up to date with the various things currently going on in my mind and that of other developers.&lt;br /&gt;&lt;br /&gt;I plan to make this blog something that will enable a lot of discussion, especially about &lt;a href="http://cilib.sourceforge.net"&gt;CIlib&lt;/a&gt; - as we work towards the future releases of the library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2659536140499105799-5383697710716484472?l=performiteration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://performiteration.blogspot.com/feeds/5383697710716484472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://performiteration.blogspot.com/2009/07/first-blog-entry.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/5383697710716484472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2659536140499105799/posts/default/5383697710716484472'/><link rel='alternate' type='text/html' href='http://performiteration.blogspot.com/2009/07/first-blog-entry.html' title='First blog entry'/><author><name>Gary Pamparà</name><uri>https://profiles.google.com/114601108124884197393</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-VQ0Az3llxCc/AAAAAAAAAAI/AAAAAAAAACU/0fbsFQkoXgk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry></feed>
