<?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-5488219695306771177</id><updated>2011-07-30T22:18:47.078+04:00</updated><category term='classification'/><category term='events'/><category term='fun'/><category term='tools'/><category term='ranking'/><category term='links'/><category term='ideas'/><category term='books'/><category term='talks'/><category term='papers'/><category term='thoughts'/><title type='text'>Sex, drugs and applied science</title><subtitle type='html'>Machine learning, data mining, computer vision and other stuff that rocks.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-7458793085107362669</id><published>2009-06-10T23:17:00.003+04:00</published><updated>2009-06-11T00:34:59.470+04:00</updated><title type='text'>SquareSpace</title><content type='html'>I don't like Blogger. It kind of sucks. This blog will be available on &lt;a href="http://squarespace.com"&gt;SquareSpace&lt;/a&gt; starting from now!&lt;br /&gt;&lt;br /&gt;Take a look - &lt;a href="http://sexdrugsandappliedscience.com"&gt;http://sexdrugsandappliedscience.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-7458793085107362669?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/7458793085107362669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/06/squarespace.html#comment-form' title='43 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/7458793085107362669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/7458793085107362669'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/06/squarespace.html' title='SquareSpace'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>43</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-7181782372516280646</id><published>2009-06-05T12:41:00.003+04:00</published><updated>2009-06-05T15:43:58.625+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='papers'/><title type='text'>Paper from the WIT talk</title><content type='html'>Preprint of the paper associated with my &lt;a href="http://sexdrugsandappliedscience.blogspot.com/2009/06/phd-summer-school-wit.html"&gt;WIT talk&lt;/a&gt; I've recently posted about is available at &lt;a href="http://arxiv.org/abs/0906.0872"&gt;arxiv.org&lt;/a&gt; now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-7181782372516280646?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/7181782372516280646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/06/paper-from-wit-talk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/7181782372516280646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/7181782372516280646'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/06/paper-from-wit-talk.html' title='Paper from the WIT talk'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-8528543515520385112</id><published>2009-06-03T22:15:00.004+04:00</published><updated>2009-06-05T11:43:53.426+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='talks'/><category scheme='http://www.blogger.com/atom/ns#' term='papers'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>PhD summer school, WIT</title><content type='html'>Yesterday I've participated in pattern recognition section of PhD summer school on Scentific Computing. It's a web conference event. Several universities participate in it, including Waterford University of Technology and our Moscow State University. There I have a talk about my last research work: accelerating boosting with genetic algorithms. That was my first experience of web conferencing, but everything went ok as I think.&lt;br /&gt;&lt;br /&gt;If someone is interested, slides from my talk are available &lt;a href="http://angel.cs.msu.su/~yangel/Slides/Accelerating_Boosting_With_Genetic_Algorithm.pdf"&gt;there&lt;/a&gt;. AFAIK conference site will appear soon. It will contain both the presentations and theses of the presented works. There should be some interesting stuff there. For example, I'd like the talk about feature set compactness of the training set and its relation to k-NN classifiers by Dmitry Potepalov.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-8528543515520385112?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/8528543515520385112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/06/phd-summer-school-wit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/8528543515520385112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/8528543515520385112'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/06/phd-summer-school-wit.html' title='PhD summer school, WIT'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-3021963564633869064</id><published>2009-05-28T18:29:00.006+04:00</published><updated>2009-06-05T11:43:07.175+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>Physicist Day</title><content type='html'>Last saturday Physics Department of the Moscow State University was celebrating it's traditional holiday: Physicist Day. Every year something funny, strange or scaring happens to me on that day, but the last time was special. Here is a list of things I remember:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;19:00&lt;/span&gt; - Me and two my friends go to the local bar. It has nothing to deal with Physicist Day.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;23:30&lt;/span&gt; - Being quite drunk we try to return home. But near the campus we meet a bunch of our friends (being quite drunk too because of celebrating Physicist Day). They suggest to go to the night club where physicist's party is just starting. We take some beer.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;23:50&lt;/span&gt; - Something strange happens in the street railway. Somehow we get a big black hat.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;00:00&lt;/span&gt; - We are near the club where we meet some other guys from both CMC and Physics departments. Suddenly a fight between a guy being with us and some other guy starts.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;00:05&lt;/span&gt; - Some other guys trying to prevent previous fight begin to fight because of a little misunderstanding.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;00:10&lt;/span&gt; - Now guys who was trying to prevent the second fight are fighting because of the same reason.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;00:15&lt;/span&gt; - Guy from the very first fight call the cops.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;00:20&lt;/span&gt; - Cops are there. One of my friends is trying to prevent "the situation".&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;00:25&lt;/span&gt; - Cops go away. We're in the club.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;00:30&lt;/span&gt; - Tequila, sambuca, Long Island, more tequila, more Long Island, ...&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;DO NOT REMEMBER&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;01:10&lt;/span&gt; - Somehow we get into VIP zone. I have no idea about it.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;DO NOT REMEMBER&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;01:30&lt;/span&gt; - Suddenly I found myself on the dancefloor kissing some unknown chick.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;DO NOT REMEMBER&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;02:30&lt;/span&gt; - Suddenly I found myself in the car going to the nearest ATM to get some money. When we get to the ATM, I can't open the door. Too drunk to insert my credit card into an electronic lock. Driver helps me. I take the money and we return to the club. I gave about 40$ to driver for the 100-meter trip in the car (bad idea).&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;03:00&lt;/span&gt; - I drink some shit again. I rock with some unknown girl. One of my friends get knocked out  from the club for the immoral conduct. &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;DO NOT REMEMBER&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;05:00&lt;/span&gt; - Staying at the street with some unknown chicks. Feeling bad.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;DO NOT REMEMBER&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;07:00&lt;/span&gt; - Found myself at home&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;SLEEPING&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;16:00&lt;/span&gt; - Feeling like a shit&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Result: about $500 spent in a chip dirty club in one night, headache for a day, a lot of impressions. God Damnit, I like physics ;)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-3021963564633869064?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/3021963564633869064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/physicist-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/3021963564633869064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/3021963564633869064'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/physicist-day.html' title='Physicist Day'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-7868072114747910684</id><published>2009-05-17T14:24:00.004+04:00</published><updated>2009-05-17T23:00:08.858+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>RoboZZle solver update</title><content type='html'>I've just &lt;a href="http://robozzlesolver.googlecode.com/files/Solver_0_2.zip"&gt;updated&lt;/a&gt; my &lt;a href="http://robozzle.com/"&gt;RoboZZle&lt;/a&gt; &lt;a href="http://code.google.com/p/robozzlesolver"&gt;solver&lt;/a&gt;. There are two major changes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I've fixed bug with program execution loop detection using approach proposed by &lt;a href="http://igoro.com/"&gt;Igor Ostrovsky&lt;/a&gt; &lt;a href="http://sexdrugsandappliedscience.blogspot.com/2009/03/robozzle-part-2.html"&gt;there&lt;/a&gt;. So it can solve "&lt;em&gt;Count the tiles&lt;/em&gt;"-like puzzles now.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I've added the whole new solving approach based onto evolutionary algorithm (implemented using &lt;a href="http://code.google.com/p/aforge/"&gt;AForge.NET&lt;/a&gt; library). It is not very useful just for now, but still can solve some complicated puzzles. I've used eaten star count as a fitness function for program. So, if there is only one or two stars on the field, this approach works just like random search. But if you know correct path for your robot (it is obvious in many puzzles), you can mark it all with stars using field editor integrated in the solver, giving your guess to the evolutionary algorithm. The main problem with this approach is that in many puzzles correct program is &lt;span style="font-weight: bold;"&gt;very&lt;/span&gt; different from the program that can collect almost all the stars on the field. I need better fitness function, and probably, some other crossover and mutation ops. Currently chromosome is just a concatenation of all the program functions' code. Mutation operator changes color or operation at random position of the chromosome. 2-point crossover exchange operations between two chromosomes.&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_d8HbKgZ8Edw/Sg_qnO-Vf0I/AAAAAAAAACY/Nt-_lESYbwc/s1600-h/solver.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 385px;" src="http://3.bp.blogspot.com/_d8HbKgZ8Edw/Sg_qnO-Vf0I/AAAAAAAAACY/Nt-_lESYbwc/s400/solver.jpg" alt="" id="BLOGGER_PHOTO_ID_5336742043212676930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Btw, I will be really happy if you add a comment to this post describing what puzzles can (and can not) be solved using brute-force or evolutionary approach. That information will help me to improve my solver a lot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-7868072114747910684?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/7868072114747910684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/robozzle-solver-update.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/7868072114747910684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/7868072114747910684'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/robozzle-solver-update.html' title='RoboZZle solver update'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_d8HbKgZ8Edw/Sg_qnO-Vf0I/AAAAAAAAACY/Nt-_lESYbwc/s72-c/solver.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-4336846527849291288</id><published>2009-05-16T13:46:00.012+04:00</published><updated>2009-05-17T23:01:35.308+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ranking'/><title type='text'>RankBoost and DCG</title><content type='html'>So I've finally sucked (my best DCG on test set is 4.198 which is kind of not too good) in the Yandex contest I've already &lt;a href="http://sexdrugsandappliedscience.blogspot.com/2009/03/at-this-time-im-participating-in.html"&gt;posted&lt;/a&gt; about. As I think, there were two major problems: lack of time and, unfortunately, lack of good ideas. But I want to share with you some things I've learned while participating in it.&lt;br /&gt;&lt;br /&gt;One of the ranking algorithms I've tried was &lt;a href="http://portal.acm.org/citation.cfm?id=945365.964285&amp;amp;coll=ACM&amp;amp;dl=ACM&amp;amp;CFID=34815658&amp;amp;CFTOKEN=70013982"&gt;RankBoost &lt;/a&gt;with binary rankers originally proposed by Freund and Schapire. To have ability to separate not only documents with high value of some feature from documents with low value of the same feature, but also, for example, documents with feature value distributed somewhere around 0.5 from any other, I've performed additional experiments using ranking features that are functions of another features. For that purpose I've selected truncated gaussian with mean=0.5 and also [0,1]-multimodal sinus-based function:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_d8HbKgZ8Edw/Sg6Sho-JR3I/AAAAAAAAAB4/DxsOTpD5uuU/s1600-h/ExpPlot.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 387px; height: 304px;" src="http://4.bp.blogspot.com/_d8HbKgZ8Edw/Sg6Sho-JR3I/AAAAAAAAAB4/DxsOTpD5uuU/s400/ExpPlot.png" alt="" id="BLOGGER_PHOTO_ID_5336363715112028018" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_d8HbKgZ8Edw/Sg6ShgCHmZI/AAAAAAAAACA/ZHpbT5gk5Z8/s1600-h/SinPlot.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 299px;" src="http://2.bp.blogspot.com/_d8HbKgZ8Edw/Sg6ShgCHmZI/AAAAAAAAACA/ZHpbT5gk5Z8/s400/SinPlot.png" alt="" id="BLOGGER_PHOTO_ID_5336363712712776082" border="0" /&gt;&lt;/a&gt;There are plots representing experiment results in terms of RankBoost performance value and Yandex DCG:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_d8HbKgZ8Edw/Sg6S9R69E2I/AAAAAAAAACI/qZSOM_aYrwQ/s1600-h/Performance.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 284px;" src="http://3.bp.blogspot.com/_d8HbKgZ8Edw/Sg6S9R69E2I/AAAAAAAAACI/qZSOM_aYrwQ/s400/Performance.png" alt="" id="BLOGGER_PHOTO_ID_5336364189960967010" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_d8HbKgZ8Edw/Sg6TODXAY7I/AAAAAAAAACQ/_SlRENxH7JY/s1600-h/DCG.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 284px;" src="http://1.bp.blogspot.com/_d8HbKgZ8Edw/Sg6TODXAY7I/AAAAAAAAACQ/_SlRENxH7JY/s400/DCG.png" alt="" id="BLOGGER_PHOTO_ID_5336364478109868978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As for me, I've drawn 3 conslusions:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Using only original features for creating weak ranker sucks.&lt;/li&gt;&lt;li&gt;Using weak rankers based on functions of features is slightly better.&lt;/li&gt;&lt;li&gt;The whole approach still sucks in terms of DCG.&lt;/li&gt;&lt;/ol&gt;I should have tried RankBoost with concave learners proposed &lt;a href="http://portal.acm.org/citation.cfm?id=1314498.1314527&amp;amp;coll=Portal&amp;amp;dl=GUIDE&amp;amp;CFID=34817346&amp;amp;CFTOKEN=14565834"&gt;there&lt;/a&gt;. Oh, forget to mention. Yandex DCG for query can be calculated like that:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;img src="http://www.codecogs.com/gif.latex?DCG=%5Csum_i%5Cfrac%7Brel_i%7D%7B%5Clog_2i%20+%201%7D" align="middle" border="0" /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Final DCG value is then acquired by calculating sum of DCGs of all the queries and then dividing it to the number of queries.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-4336846527849291288?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/4336846527849291288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/rankboost-and-dcg.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/4336846527849291288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/4336846527849291288'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/rankboost-and-dcg.html' title='RankBoost and DCG'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_d8HbKgZ8Edw/Sg6Sho-JR3I/AAAAAAAAAB4/DxsOTpD5uuU/s72-c/ExpPlot.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-370045571571378342</id><published>2009-05-15T11:55:00.010+04:00</published><updated>2009-05-17T23:01:05.325+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Dependency reconstruction using Infer.NET</title><content type='html'>Today we'll take a look at the &lt;a href="http://sexdrugsandappliedscience.blogspot.com/2009/04/bayesian-inference-for-boys.html"&gt;sexual relationship&lt;/a&gt; problem from another point. Let's assume that there is some decision model describing how girls select their sexual partners. But, unfortunately, we don't know that model yet. One day some girl we know has betrayed a secret: decision model is linear and it depends on such a factors: your sexuality, your smartness and also girl's slutness. So we decided to find out the way that model actually looks like. The most simple way to do that is to gather some training data of the following format: (sexuality, smartness, slutness, was there any sex). Yeah, we assume that we can somehow estimate that values for some girls and boys and ask them about sex. Than we can use &lt;a href="http://research.microsoft.com/apps/pubs/default.aspx?id=65611"&gt;Bayes point machine&lt;/a&gt; implemented in &lt;a href="http://research.microsoft.com/en-us/um/cambridge/projects/infernet/default.aspx"&gt;Infer.NET&lt;/a&gt; to reconstruct that linear model. Factor graph for that implementation is really simple. It just assumes that we can get an answer by calculating inner product between weight vector (which describes our linear model) and observation vector (which contains first 3 values of the training data vector followed by 1 for representing bias) and checking if it is positive:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://2.bp.blogspot.com/_d8HbKgZ8Edw/Sg0i8eidtEI/AAAAAAAAABw/q4alU1jAdOc/s400/picture.png" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 299px; height: 400px;" alt="" id="BLOGGER_PHOTO_ID_5335959555889017922" border="0" /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;That model can be build using following code piece:&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;Range range = new Range(ItemsCount);&lt;br /&gt;VariableArray&amp;lt;bool&amp;gt; observedSex = Variable.Observed(observedResults, range).Named("observed sex");&lt;br /&gt;VariableArray&amp;lt;Vector&amp;gt; trainingData = Variable.Observed(observedData, range).Named("observations");&lt;br /&gt;Variable&amp;lt;Vector&amp;gt; weights = Variable.Random(&lt;br /&gt;new VectorGaussian(new Vector(ParamCount),&lt;br /&gt;PositiveDefiniteMatrix.Identity(ParamCount))).Named("weights");&lt;br /&gt;observedSex[range] = Variable.InnerProduct(weights, trainingData[range]) &gt; 0;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;So, let's generate some observed data using "unknown" linear model:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;pre name="code" class="c-sharp"&gt;const int ParamCount = 4;&lt;br /&gt;Vector[] observedData = new Vector[ItemsCount];&lt;br /&gt;bool[] observedResults = new bool[ItemsCount];&lt;br /&gt;for (int i = 0; i &amp;lt; ItemsCount; ++i)&lt;br /&gt;{&lt;br /&gt;double sexuality = Math.Max(0, Math.Min(Gaussian.Sample(0.5, 1), 1));&lt;br /&gt;double smartness = Math.Max(0, Math.Min(Gaussian.Sample(0.1, 0.5), 1));&lt;br /&gt;double slutness = Math.Max(0, Math.Min(Gaussian.Sample(0.3, 1), 1));&lt;br /&gt;bool haveSex = sexuality + 0.1 * smartness - slutness &amp;gt; 0.25;&lt;br /&gt;observedData[i] = new Vector(sexuality, smartness, slutness, 1);&lt;br /&gt;observedResults[i] = haveSex;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;We can now infer weight vector posterior distribution using Expectation Propagation algorithm. Gaussian distribution is symmetric and unimodal, so we'll take it's mean as a result.&lt;/div&gt;&lt;pre name="code" class="c-sharp"&gt;InferenceEngine engine = new InferenceEngine { Algorithm = new ExpectationPropagation()};&lt;br /&gt;VectorGaussian weightDistribution = engine.Infer&amp;lt;VectorGaussian&amp;gt;(weights);&lt;br /&gt;Vector mean = weightDistribution.GetMean();&lt;br /&gt;Console.WriteLine(&lt;br /&gt;"Model: ({0:0.00})*sexuality + ({1:0.00})*smartness + ({2:0.00})*slutness + ({3:0.00}) &amp;gt; 0",&lt;br /&gt;1, mean[1] / mean[0], mean[2] / mean[0], mean[3] / mean[0]);&lt;br /&gt;&lt;/pre&gt;After running that sample we'll get the following output which confirms that we have reconstructed unknown linear model quite precise:&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;Compiling model...done.&lt;br /&gt;Initialising...done.&lt;br /&gt;Iterating:&lt;br /&gt;.........|.........|.........|.........|.........| 50&lt;br /&gt;Model: (1.00)*sexuality + (0.10)*smartness + (-0.99)*slutness + (-0.26) &amp;gt; 0&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-370045571571378342?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/370045571571378342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/dependency-reconstruction-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/370045571571378342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/370045571571378342'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/dependency-reconstruction-using.html' title='Dependency reconstruction using Infer.NET'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_d8HbKgZ8Edw/Sg0i8eidtEI/AAAAAAAAABw/q4alU1jAdOc/s72-c/picture.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-331880409026740264</id><published>2009-05-10T20:23:00.003+04:00</published><updated>2009-05-10T20:41:13.395+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='books'/><title type='text'>Little update</title><content type='html'>I've finally received "The Elements of Statistical Learning" book from &lt;a href="http://www.amazon.com/Elements-Statistical-Learning-T-Hastie/dp/0387952845"&gt;Amazon&lt;/a&gt;. It's really great because it covers probably all the important machine learning topics including various regression and classification algorithms, model selection, graphical models, dimensionality reduction and many more. And this is also the first book covering boosting good (which is kind of important for me). Book authors, Trevor Hastie, Robert Tibshirani and Jerome Friedman are famous machine learning scientists from Stanford University. And the last one: book is published by Springer on an awesome paper with color plots. Holy crap, I like it!&lt;br /&gt;&lt;br /&gt;Btw about Springer. Today I've found that one of the university shells I have access to is in the same university subnet where all the papers from SpringerLink are available for free. So I've written a little script that downloads requested article to my computer through that shell. Together with ACM account I've recently bought it gaves me acceess to almost every article I want.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-331880409026740264?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/331880409026740264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/little-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/331880409026740264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/331880409026740264'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/05/little-update.html' title='Little update'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-2847328731483749541</id><published>2009-04-26T19:59:00.004+04:00</published><updated>2009-04-26T22:14:57.533+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Bunch of useful links</title><content type='html'>Blogs about machine learning:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://hunch.net/"&gt;http://hunch.net/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://slycoder.wordpress.com/"&gt;http://slycoder.wordpress.com/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://yaroslavvb.blogspot.com/"&gt;http://yaroslavvb.blogspot.com/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Some funny stuff about theorem proving: &lt;a href="http://www.wolfbane.com/jazz/proof.htm"&gt;http://www.wolfbane.com/jazz/proof.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Genetic algorithm for producing beautiful artwork: &lt;a href="http://oranchak.com/photosome/results/"&gt;http://oranchak.com/photosome/results/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-2847328731483749541?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/2847328731483749541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/bunch-of-useful-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/2847328731483749541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/2847328731483749541'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/bunch-of-useful-links.html' title='Bunch of useful links'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-2487321456386309767</id><published>2009-04-22T18:18:00.010+04:00</published><updated>2009-04-23T11:24:54.493+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Bayesian inference for boys</title><content type='html'>&lt;div&gt;Learning something is good. Learning something using interesting examples is even better. Today I'm going to show you the power of bayesian inference by building model representing probability of you having some sex. If you want more formal introduction, please read this &lt;a href="http://research.microsoft.com/en-us/um/people/cmbishop/downloads/bishop-wcci-2008.pdf"&gt;paper&lt;/a&gt; written by Christopher Bishop, famous researcher from Microsoft Research Cambridge.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Bayesian inference is a method for finding posterior distribution of dependent set of random variables, when some variables are observed and some are not interesting. That set of variables is often represented as so-called graphical model: a directed graph called &lt;a style="font-weight: bold;" href="http://en.wikipedia.org/wiki/Bayesian_network"&gt;Bayesian network&lt;/a&gt; or undirected graph called &lt;a style="font-weight: bold;" href="http://en.wikipedia.org/wiki/Markov_network"&gt;Markov network&lt;/a&gt;. In that kind of graph vertices represent random variables and edge connecting two vertices mean that variables associated with that vertices are dependent. That representation is not only clean and obvious, but it also allows using some fast and robust algorithms for performing inference.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's look at concrete example. We'll try to build simple model describing sexual relationships between boys and girls. Probability of you having sex with some girl mostly depends on the degree of she liking you (which depends on you sexuality) and her so-called slutness. I've also considered some gaussian noise in woman's head that sometimes dramaticaly imacts on her decisions. An assumption that slutness and sexuality are distributed normally around zero (which we consider as an average value for that variables) and value describing how much she likes you is also distributed normally around your sexuality allows us to build simple graphical model. Amazing tool for that is &lt;a style="font-weight: bold;" href="http://www.blogger.com/%28http://research.microsoft.com/en-us/um/cambridge/projects/infernet/"&gt;Infer.NET&lt;/a&gt;, .NET library for bayesian inference from Microsoft Research. Model code is quite short:&lt;/div&gt;&lt;br /&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;br /&gt;Variable&amp;lt;double&amp;gt; youAreSexy = Variable.GaussianFromMeanAndVariance(0, 1).Named("you're sexy");&lt;br /&gt;Variable&amp;lt;double&amp;gt; howMuchSheLikesYou = Variable.GaussianFromMeanAndVariance(youAreSexy, 0.25).Named("how much she likes you");&lt;br /&gt;Variable&amp;lt;double&amp;gt; slutness = Variable.GaussianFromMeanAndVariance(0, 1).Named("her slutness");&lt;br /&gt;Variable&amp;lt;double&amp;gt; randomNoiseInHerHead = Variable.GaussianFromMeanAndVariance(0, 0.25).Named("noise in her head");&lt;br /&gt;Variable&amp;lt;bool&amp;gt; willYouHaveSexToday = (howMuchSheLikesYou + randomNoiseInHerHead + slutness &gt; 0).Named("will you have some sex?");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;After compiling model in &lt;span style="font-weight: bold;"&gt;Infer.NET&lt;/span&gt; you'll get a graphical representation of your model which is called factor graph. It looks very similar to bayesian network but also contains special "factor" nodes representing different operations, constrains and distributions. Clickable picture below is an example of factor graph for our "sex" model:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_d8HbKgZ8Edw/Se8ply8IN6I/AAAAAAAAABo/DPlBfrVMXEs/s1600-h/Model.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 275px; height: 320px;" src="http://1.bp.blogspot.com/_d8HbKgZ8Edw/Se8ply8IN6I/AAAAAAAAABo/DPlBfrVMXEs/s320/Model.png" alt="" id="BLOGGER_PHOTO_ID_5327522613508454306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's ask some questions to our model using &lt;a href="http://research.microsoft.com/en-us/um/people/minka/papers/ep/roadmap.html"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;ExpectationPropagation&lt;/span&gt;&lt;/a&gt; inference algorithm:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;slutness &lt;/span&gt;= -5 (she's REALLY not a slut), &lt;span class="Apple-style-span" style="font-style: italic;"&gt;willYouHaveSexToday &lt;/span&gt;= true (yeah, you did it). Then distribution of you being sexy is Gaussian(3.514, 0.3635) which means you are beauty as a devil (I guess).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;slutness &lt;/span&gt;= -0.5 (she's just a girl), &lt;span class="Apple-style-span" style="font-style: italic;"&gt;youAreSexy &lt;/span&gt;= -1 (you are not a good one). Then probability of you having sex today is 0.01695. It means that your chances are quite small.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;youAreSexy &lt;/span&gt;= -5 (oh, you look really bad), &lt;span class="Apple-style-span" style="font-style: italic;"&gt;willYouHaveSexToday &lt;/span&gt;= true (but still have some sex? strange, isn't it?). Then distribution of her &lt;span class="Apple-style-span" style="font-style: italic;"&gt;slutness &lt;/span&gt;is Gaussian(3.514, 0.3635) (oh, she is a slut... that makes sence).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;So, bayesian inference helps us with different questions about girls, sex and everything. Remember that provided model is very simple and inaccurate. For example, one can consider slutness as a variance of &lt;span class="Apple-style-span" style="font-style: italic;"&gt;howMuchSheLikesYou &lt;/span&gt;variable or add some other random variables and factors into model. Have fun with it and don't forget that math is great.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-2487321456386309767?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/2487321456386309767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/bayesian-inference-for-boys.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/2487321456386309767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/2487321456386309767'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/bayesian-inference-for-boys.html' title='Bayesian inference for boys'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_d8HbKgZ8Edw/Se8ply8IN6I/AAAAAAAAABo/DPlBfrVMXEs/s72-c/Model.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-6291698001517015556</id><published>2009-04-17T15:40:00.002+04:00</published><updated>2009-04-23T11:25:39.171+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Future is now #2</title><content type='html'>See augmented reality in action - &lt;a href="http://ge.ecomagination.com/smartgrid/#/augmented_reality"&gt;http://ge.ecomagination.com/smartgrid/#/augmented_reality&lt;/a&gt;&lt;div&gt;You just need a webcam and a black-white printing device.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-6291698001517015556?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/6291698001517015556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/future-is-now-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/6291698001517015556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/6291698001517015556'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/future-is-now-2.html' title='Future is now #2'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-1075364402538438038</id><published>2009-04-06T16:09:00.003+04:00</published><updated>2009-04-06T16:28:10.021+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Weighted voting for president elections</title><content type='html'>It's totally true that choosing new president for your country is quite important decision. And it's also true that some people are clever, and some are not. I understand all that democracy stuff, but why should we care about some junky opinion as much, as about the Noble Prize laureate's one. Solution of this problem is well known in machine learning. It's called &lt;a href="http://en.wikipedia.org/wiki/Weighted_voting"&gt;weighted voting&lt;/a&gt; and consists of assigning weights to the each voter and then combining votes together with weights being taken into account.&lt;div&gt;The only question is: how should we assign weights to voters? What's the formula, man? Well, my answer is simple: I don't know yet. But weight should probably depend on education, average earnings, number of children in family and all that social stuff. We don't want some sociopath make decisions for us, right?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-1075364402538438038?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/1075364402538438038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/weighted-voting-for-president-elections.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/1075364402538438038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/1075364402538438038'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/weighted-voting-for-president-elections.html' title='Weighted voting for president elections'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-1262090111085500909</id><published>2009-04-05T15:25:00.007+04:00</published><updated>2009-04-05T17:34:33.286+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>LaTeX test</title><content type='html'>This post is just a test of blogspot LaTeX support provided by &lt;a href="http://servalx02.blogspot.com/"&gt;servalx02&lt;/a&gt;. Idea is based on &lt;a href="http://xkcd.org/563/"&gt;xkcd 563&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Let's estimate so called Emelyanov's constant (which is named after my friend Anton Emelyanov) which represesents gay density in given city. As I live in Moscow, that would be our city of interest.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.codecogs.com/gif.latex?S_%7BMoscow%7D=1081%5Cmbox%7B%20km%7D%5E2" align="middle" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.codecogs.com/gif.latex?P_%7BMoscow%7D=10382754%5Cmbox%7B%20inhabitants%7D" align="middle" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.codecogs.com/gif.latex?D_%7BMoscow%7D=P_%7BMoscow%7D/S_%7BMoscow%7D=9605%5Cmbox%7B%20inhabitants%20per%20km%7D%5E2" align="middle" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.codecogs.com/gif.latex?R%5E%7BGay%7D=0.03" align="middle" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.codecogs.com/gif.latex?C_%7BMoscow%7D%5E%7BEmelyanov%7D=0.5%5Ctimes%20D_%7BMoscow%7D%5Ctimes%20R%5E%7BGay%7D=144%5Cmbox%7B%20gays%20per%20km%7D%5E2" align="middle" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Quite much, yeah? According to the &lt;a href="http://en.wikipedia.org/wiki/Law_of_large_numbers"&gt;Law of large numbers&lt;/a&gt;, if you've lived in Moscow for long, then you were surrounded by 144 gays on average. I don't think that's bad, by the way.&lt;br /&gt;&lt;br /&gt;Gay rate was specified according to &lt;a href="http://www.krysalis.net/homosexuality.htm"&gt;http://www.krysalis.net/homosexuality.htm&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-1262090111085500909?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/1262090111085500909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/latex-test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/1262090111085500909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/1262090111085500909'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/latex-test.html' title='LaTeX test'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-4635394722752508445</id><published>2009-04-02T12:16:00.003+04:00</published><updated>2009-04-02T12:21:18.260+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><title type='text'>Good news</title><content type='html'>They've finally added &lt;a href="http://www.mathworks.com/products/new_products/latest_features.html?s_cid=HP_FP_RH_2009a"&gt;.NET support&lt;/a&gt; into MATLAB! There are many &lt;a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/rn/bro2uzv.html&amp;amp;http://www.mathworks.com/products/new_products/latest_features.html?s_cid=HP_FP_RH_2009a"&gt;limitations&lt;/a&gt; still, but a journey of a thousand miles starts with one step, right?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-4635394722752508445?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/4635394722752508445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/good-news.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/4635394722752508445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/4635394722752508445'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/04/good-news.html' title='Good news'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-4975744753519770958</id><published>2009-03-31T21:15:00.007+04:00</published><updated>2009-04-02T22:26:03.796+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><title type='text'>Scientific OS</title><content type='html'>At this time I'm participating in a &lt;a href="http://company.yandex.ru/academic/grant/"&gt;contest&lt;/a&gt; provided by Russian search engine called &lt;a href="http://yandex.ru/"&gt;Yandex&lt;/a&gt;. In the contest participants should build an algorithm which can rank web search results by relevance well, using features of both found documents and search query itself. Later I'll post about my contest experience, but today I want to write about something else.&lt;br /&gt;&lt;br /&gt;While solving such tasks you always have to deal with large amounts of data in different formats. It often involves implementing some converters etc. For example, in the Yandex contest I've tried to apply &lt;a href="http://www.cs.cornell.edu/People/tj/svm_light/svm_rank.html"&gt;SVMRank&lt;/a&gt; algorithm to the given data using &lt;a href="http://svmlight.joachims.org/"&gt;SVMLight&lt;/a&gt; first. That forced me to write a small program for sorting input data by query id because of SVMLight requirements. Then, of course, I've added ability to restore original data order to my program because results are checked by the contest automatic checking system which knows anything about me reordering the data. Then I've decided to apply &lt;a href="http://en.wikipedia.org/wiki/Principal_components_analysis"&gt;PCA&lt;/a&gt; to the input data before applying SVMRank algorithm (warning! due to the unusual feature value distributions result was terrible!). MATLAB contains freely available PCA implementation, so I've added ability to export data to format supported by MATLAB and import it back to my program. Then I repeated the following sequence of actions several times (for each number of selected PCA components): convert data to MATLAB, load attributes, apply PCA (fortunately, first 3 steps should be done only once), save first K attributes, convert back to SVMLight format, sort by query id, learn SVMRank model. Then I did the same for the test data except of replacing model learning with rank prediction and original order restoring. Of course, I could make a script from that action sequence and run it several times, but it has it's own drawbacks. For example, I know nothing about integrating external applications with MATLAB and learning that stuff can only increase amount of time required to perform the whole process.So, that's all boring, dreary and it distracts you from the actual task. What can we do about it? I've just thought: why there is no special operating system for researchers, scientists and engineers that can make their lifes much more easier. Here is a short list of what I'd like to see in it:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Primary&lt;/strong&gt; (related to the previous paragraph)&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Math engine (some kewl mixture of MATLAB and MAPLE) should be integrated with OS environment. I want ability to run any math command in any shell opened and get result immediately (well, it depends on command). And all the calculated math data should be accessible through math engine from any other OS part.&lt;/li&gt;&lt;li&gt;There should be comfortable math engine API available for most popular programming languages.&lt;/li&gt;&lt;li&gt;There should be some standard for all the data types used in the math engine.&lt;/li&gt;&lt;li&gt;All the external math algorithms should be integrated in the OS math engine. All that algorithms should use the same math data types provided by math engine (see 3).&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Secondary&lt;/strong&gt; (all the ideas that came to my head while writing "Primary" section):&lt;/p&gt;&lt;ol&gt;&lt;li&gt;I'd like to see some semantic relationship database integrated to the OS where you can hold dependencies between papers, researchers, lectures, presentations, data sets, experiment results etc (take a look at the &lt;a href="http://research.microsoft.com/en-us/projects/zentity/"&gt;MSR Research-Output Repository Platform&lt;/a&gt;). For example, it would be rather kewl to visualize references between articles related to some research area as a graph. It allows you to filter the most important works quickly and opens many other possibilities.&lt;/li&gt;&lt;li&gt;There should be some useful network interaction mechanisms. For example, I can stream experiment results in real-time mode to my colleague who will immediately visualize it. Or I can implement some math algorithm using OS math engine and ask my colleagues to share their computing capabilities with me. Or I can submit it to some computing server and then stream required data to it. And all of it completely transparently. And there should be, of course, some mechanism for relationship synchronization between network nodes.&lt;/li&gt;&lt;li&gt;And, finally, it would be a pleasure to have some comfortable LaTeX editor and compiler with all the necessary stuff.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;At least, unification of the data formats and math engine will help with exchanging data, prototypes, algorithms etc between researchers. Nowadays it turns into "Let's try to build it" game very often.&lt;br /&gt;Well, it would be nice to hear other ideas and opinions. And then, may be, someone will read this post, get inspired and 5 to 7 years later new operating system will totally change all the scientific community =)&lt;br /&gt;By the way, my team in the Yandex contest has the same name as this blog. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-4975744753519770958?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/4975744753519770958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/at-this-time-im-participating-in.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/4975744753519770958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/4975744753519770958'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/at-this-time-im-participating-in.html' title='Scientific OS'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-7513735521271602235</id><published>2009-03-23T22:29:00.006+03:00</published><updated>2009-03-24T21:57:11.746+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='events'/><title type='text'>Freeman Dyson</title><content type='html'>Today I've visited an interesting event - Freeman Dyson's lecture at the &lt;a href="http://www.lebedev.ru/en/"&gt;Lebedev Physical Institute of the Russian Academy of Sciences&lt;/a&gt;. Dyson is American physicist and mathematician, famous mostly for his work in quantum field theory, but also for some very interesting and provocative thoughts about science, religion, life and everything (today he said something like "I'm too old for science, but young enough for philosophy"). Many of his ideas are about our future: look at &lt;a href="http://en.wikipedia.org/wiki/Dyson_sphere"&gt;Dyson sphere&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/Dyson_tree"&gt;Dyson tree&lt;/a&gt;. But today his lecture was related to global warming, nuclear weapons and genetic engineering.&lt;br /&gt;Here is a short list of what I've learned today:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Dyson thinks that genetically modified plants can solve all the problems with global warming. Some people say that's crap but who knows? I'm not a specialist.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;There probably was a quite long pre-evolution period when simple life forms (consisting of a few self-replicating moleculas) shared their advantages to each other (like in open source) to improve life quality and become more sophisticated organisms.&lt;/li&gt;&lt;li&gt;6 thousand years ago there were a lot of lakes and trees in &lt;a href="http://en.wikipedia.org/wiki/Sahara"&gt;Sahara&lt;/a&gt;. And if global warming will strike, trees and lakes can come back.&lt;/li&gt;&lt;li&gt;Genetic engineering can become for us something like computer games in the future. Imagine a genetic game when you should grow the most powerful lizard in a week. Sounds great, but a bit strange.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Nuclear strikes were not the reason Japain surrendered in WWII.&lt;/li&gt;&lt;/ul&gt;There was a lot of other amazing stuff, but I'm just too lazy to post it there. It's much more better to listen him, than to read about it here. He worked with &lt;a href="http://en.wikipedia.org/wiki/Einstein"&gt;Albert Einstein&lt;/a&gt; and my favorite physicist (do you have a favorite physicist?) &lt;a href="http://en.wikipedia.org/wiki/Richard_Feynman"&gt;Richard Feynman&lt;/a&gt;, btw.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-7513735521271602235?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/7513735521271602235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/freeman-dyson.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/7513735521271602235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/7513735521271602235'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/freeman-dyson.html' title='Freeman Dyson'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-4018151347556900345</id><published>2009-03-18T18:29:00.000+03:00</published><updated>2009-03-18T18:40:42.059+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Invent now!</title><content type='html'>&lt;a href="http://www.ted.com/index.php/talks/pattie_maes_demos_the_sixth_sense.html"&gt;Here&lt;/a&gt; is one simple example of what can one very-very talented guy do with computer vision technologies. Btw, there are a lot of other interesting and amazing stuff at &lt;a href="http://www.ted.com"&gt;TED&lt;/a&gt;. Feel inspired, invent and have fun!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I don't have much time right now to improve &lt;a href="http://sexdrugsandappliedscience.blogspot.com/2009/03/robozzle-part-2.html"&gt;RoboZZle solver&lt;/a&gt; or just write something interesting into blog. Currently I'm stuck with finally implementing working &lt;a href="http://vision.ucla.edu/~doretto/publications/wuLD08cvpr.pdf"&gt;BRM&lt;/a&gt; face alignment at work, doing some university stuff like implementing simple linear algebra algorithms for &lt;a href="http://en.wikipedia.org/wiki/Blue_Gene"&gt;BlueGene/P&lt;/a&gt; supercomputer, finishing article about genetic algorithms in boosting etc. But when something amazing will happen, I'll report it immediately :)&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-4018151347556900345?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/4018151347556900345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/invent-now.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/4018151347556900345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/4018151347556900345'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/invent-now.html' title='Invent now!'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-2326476674138155799</id><published>2009-03-05T17:23:00.000+03:00</published><updated>2009-03-08T18:55:15.114+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Future is almost now</title><content type='html'>Microsoft released wonderful &lt;a href="http://www.youtube.com/watch?v=rxVS5nYFnkA"&gt;video&lt;/a&gt; as the part of their Microsoft's Future Vision Series project. In that video you can see how amazing computer (especially computer vision) technologies will change our lives in approximately 10 years.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/rxVS5nYFnkA&amp;amp;hl=ru&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/rxVS5nYFnkA&amp;amp;hl=ru&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;I'll remember that and comparewith ground truth 10 years later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-2326476674138155799?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/2326476674138155799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/future-is-almost-now.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/2326476674138155799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/2326476674138155799'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/future-is-almost-now.html' title='Future is almost now'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-711136638251526991</id><published>2009-03-05T01:40:00.000+03:00</published><updated>2009-03-08T18:58:26.797+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>RoboZZle - part 2</title><content type='html'>Due to &lt;a href="http://robozzle.com/blog/?p=23"&gt;interest&lt;/a&gt; in my &lt;a href="http://robozzle.com/"&gt;RoboZZle&lt;/a&gt; puzzle &lt;a href="http://sexdrugsandappliedscience.blogspot.com/2009/03/robozzle.html"&gt;solver&lt;/a&gt; of project developer &lt;a href="http://igoro.com/"&gt;Igor Ostrovsky&lt;/a&gt; (who by the way has a blog with tons of really interesting stuff) I've decided that it would be interesting to continue development. The first thing I made was fixing small nasty bugs and improving solver UI. Then I've created &lt;a href="http://code.google.com/p/robozzlesolver"&gt;project page&lt;/a&gt; on google code. Now anyone (who wants) can participate in developing this amazing (as I think) application.&lt;br /&gt;&lt;br /&gt;Currently solver has at least one unsolved algorithmic problem with detecting infinite loops when testing generated problem. Program state history tracking with state hash set is used in current implementation. State is represented as a vector of five numbers &lt;strong&gt;S&lt;/strong&gt;=(&lt;em&gt;X, Y, Direction, Function, Instruction&lt;/em&gt;). When solver detects that current execution state has been seen before, it decides that program had entered into infinite loop and interrupts it. This algorithm detects loops very fast but, unfortunately, sometimes it can interrupt a correct program. For example, in the problem "&lt;em&gt;Count the tiles&lt;/em&gt;" robot should rotate consequently five times on the one of the red tiles. And the state before the fifth rotation is exactly the same as before the first one. That's why my solver can't solve that task for now. I should think about implementing more correct but still efficient way of execution loop detection. Any suggestions are welcome!&lt;br /&gt;&lt;br /&gt;We have also plans to make more handy puzzle image recognition. Screenshot should be accurately cropped in your favorite image editor first when using current implementation. That can't be called "comfortable". Ability to recognize robot position and orientation will be added too.&lt;br /&gt;&lt;br /&gt;Everyone who just wants to see the solver in action can download binaries &lt;a href="http://robozzlesolver.googlecode.com/files/Solver_0_1.zip"&gt;here&lt;/a&gt; (.NET 3.5 required).&lt;br /&gt;&lt;br /&gt;Updated solver UI:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_d8HbKgZ8Edw/Sa8fehp8-fI/AAAAAAAAABg/pysqj301oiQ/s1600-h/scr.png"&gt;&lt;img style="margin: 0px auto 10px; text-align: left; width: 320px; display: block; height: 308px;" id="BLOGGER_PHOTO_ID_5309497094983973362" alt="" src="http://4.bp.blogspot.com/_d8HbKgZ8Edw/Sa8fehp8-fI/AAAAAAAAABg/pysqj301oiQ/s320/scr.png" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-711136638251526991?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/711136638251526991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/robozzle-part-2.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/711136638251526991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/711136638251526991'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/robozzle-part-2.html' title='RoboZZle - part 2'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_d8HbKgZ8Edw/Sa8fehp8-fI/AAAAAAAAABg/pysqj301oiQ/s72-c/scr.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-3259888214569360843</id><published>2009-03-01T23:18:00.000+03:00</published><updated>2009-03-02T02:02:49.362+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>RoboZZle</title><content type='html'>&lt;div&gt;As every programmer or mathematician, I like problems and puzzles a lot. I can't say I'm really-really good on it, but I've achieved some success. One of my favorite problem databases is &lt;a style="font-weight: bold;" href="http://projecteuler.net/"&gt;Project Euler&lt;/a&gt;. Problems presented there are related both to math and programming. And it's really nice that for solving less or more complex problems there you should be familiar with both disciplines. So if you have some free time, I suggest you try it. It can help you with keeping your mind clear and bright. Other good thing about it is that new problem is added to the database every week. So it's non-stop process of self-perfection.&lt;br /&gt;&lt;br /&gt;Recently my friend Ilya has shown me another puzzle-like project which is completely different from Project Euler. It's called &lt;a style="font-weight: bold;" href="http://robozzle.com/"&gt;RoboZZle&lt;/a&gt;. Each problem consists of a field colored with three (or less) different colors with stars placed on it and little robot. You should write programs for that robot to help it collect all the stars. Robot command language is very simple: there are only rotation and step commands. Complexity comes with the fact that subroutines and recursion are allowed, but number of subroutines and instructions in each subroutine is limited. Puzzles there differ from very simple that can be solved in 30 seconds to really complex taking about an hour.&lt;br /&gt;&lt;br /&gt;After solving near 40 puzzles I though that it would be really fun to make an automatic solver for &lt;span style="font-weight: bold;"&gt;RoboZZle&lt;/span&gt;. I've coded simple algorithm that uses backtracking to generate different programs of specified length and check if generated program is a solution to puzzle. After few simple optimizations made (like no right rotation followed by left or no three consequent rotations in the same direction) it has shown really good speed. I've solved then about ten puzzles from Moderate and Hard categories using my solver. To simplify puzzle input process my friend Ilya wrote a simple program converting screenshot of a puzzle from web-site into textual description.&lt;br /&gt;Currently my solver can't solve problems with more than 9 free slots available and all the three colors presented on the field because of huge size of program space. I hope I'll improve it later in some ways and put on a &lt;a style="font-weight: bold;" href="http://code.google.com/"&gt;google code&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img style="margin: 0px auto 10px; text-align: center; width: 320px; display: block; height: 263px;" id="BLOGGER_PHOTO_ID_5308356699594701970" alt="" src="http://1.bp.blogspot.com/_d8HbKgZ8Edw/SasSSxxoPJI/AAAAAAAAABY/vExjGNWyeGg/s320/scr2.png" border="0" /&gt;&lt;img style="margin: 0px auto 10px; text-align: center; width: 320px; display: block; height: 264px;" id="BLOGGER_PHOTO_ID_5308356698675711506" alt="" src="http://1.bp.blogspot.com/_d8HbKgZ8Edw/SasSSuWhjhI/AAAAAAAAABQ/yXMSVKd6rL8/s320/scr1.png" border="0" /&gt;&lt;br /&gt;Btw, &lt;strong&gt;Windows 7&lt;/strong&gt; is a great piece of software.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-3259888214569360843?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/3259888214569360843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/robozzle.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/3259888214569360843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/3259888214569360843'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/03/robozzle.html' title='RoboZZle'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_d8HbKgZ8Edw/SasSSxxoPJI/AAAAAAAAABY/vExjGNWyeGg/s72-c/scr2.png' height='72' width='72'/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-697339701250188810</id><published>2009-02-18T17:55:00.000+03:00</published><updated>2009-02-18T18:12:21.970+03:00</updated><title type='text'>Claim parade</title><content type='html'>&lt;div&gt;Here are some kewl (or not?) pictures from projects I've participated in:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;a href="http://bsgraphics.ru/commercial/products_and_solutions/products_as_technology/miracle_touch/"&gt;Miracle Touch&lt;/a&gt; system (interactive advertising floor projection):&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_d8HbKgZ8Edw/SZwin_0CmtI/AAAAAAAAABA/bccSAjwjcQc/s1600-h/_MG_5497.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 214px;" src="http://4.bp.blogspot.com/_d8HbKgZ8Edw/SZwin_0CmtI/AAAAAAAAABA/bccSAjwjcQc/s320/_MG_5497.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304152531675552466" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_d8HbKgZ8Edw/SZwioBjXEVI/AAAAAAAAABI/oWjQ-VTZR9w/s1600-h/DSCN0038.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_d8HbKgZ8Edw/SZwioBjXEVI/AAAAAAAAABI/oWjQ-VTZR9w/s320/DSCN0038.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304152532142461266" /&gt;&lt;/a&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Not yet annonced:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_d8HbKgZ8Edw/SZwinvnZ1iI/AAAAAAAAAA4/Afw_N6Tg3jY/s1600-h/Masking.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 308px; height: 320px;" src="http://2.bp.blogspot.com/_d8HbKgZ8Edw/SZwinvnZ1iI/AAAAAAAAAA4/Afw_N6Tg3jY/s320/Masking.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304152527327581730" /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_d8HbKgZ8Edw/SZwiQFgmGAI/AAAAAAAAAAw/J9Vs5mzHAgA/s1600-h/3DTracker.bmp"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 315px; height: 237px;" src="http://1.bp.blogspot.com/_d8HbKgZ8Edw/SZwiQFgmGAI/AAAAAAAAAAw/J9Vs5mzHAgA/s320/3DTracker.bmp" border="0" alt="" id="BLOGGER_PHOTO_ID_5304152120887744514" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_d8HbKgZ8Edw/SZwiQPlRgKI/AAAAAAAAAAo/icgKWGRJjw0/s1600-h/2DTracker.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 310px;" src="http://4.bp.blogspot.com/_d8HbKgZ8Edw/SZwiQPlRgKI/AAAAAAAAAAo/icgKWGRJjw0/s320/2DTracker.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304152123591721122" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;&lt;a href="http://codeplex.com/romantiquex"&gt;RomantiqueX&lt;/a&gt; (XNA-based real-time 3D rendering engine):&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_d8HbKgZ8Edw/SZwiQGtMyvI/AAAAAAAAAAg/l-d37jgKSJo/s1600-h/8.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 249px;" src="http://3.bp.blogspot.com/_d8HbKgZ8Edw/SZwiQGtMyvI/AAAAAAAAAAg/l-d37jgKSJo/s320/8.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304152121209047794" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_d8HbKgZ8Edw/SZwiP-CUAII/AAAAAAAAAAY/SXBR9NHqOSY/s1600-h/9.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 249px;" src="http://2.bp.blogspot.com/_d8HbKgZ8Edw/SZwiP-CUAII/AAAAAAAAAAY/SXBR9NHqOSY/s320/9.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304152118881681538" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_d8HbKgZ8Edw/SZwiPhz1XgI/AAAAAAAAAAQ/QkR6AxSL6Cs/s1600-h/1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 249px;" src="http://2.bp.blogspot.com/_d8HbKgZ8Edw/SZwiPhz1XgI/AAAAAAAAAAQ/QkR6AxSL6Cs/s320/1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304152111304760834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-697339701250188810?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/697339701250188810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/claim-parade.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/697339701250188810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/697339701250188810'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/claim-parade.html' title='Claim parade'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_d8HbKgZ8Edw/SZwin_0CmtI/AAAAAAAAABA/bccSAjwjcQc/s72-c/_MG_5497.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-8131660175609258018</id><published>2009-02-16T15:19:00.000+03:00</published><updated>2009-02-16T15:31:04.474+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Useful links</title><content type='html'>List of useful links I've found recently:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;International:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://scholar.google.com/"&gt;http://scholar.google.com&lt;/a&gt; - search through scientific publications provided by google.&lt;/li&gt;&lt;/ul&gt;Russian:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://machinelearning.ru/"&gt;http://machinelearning.ru&lt;/a&gt; - professional wiki for people related to machine learning and pattern recognition areas.&lt;/li&gt;&lt;li&gt;&lt;a href="http://scholar.ru/"&gt;http://scholar.ru&lt;/a&gt; - search through scientific publications (mostly in russian language).&lt;/li&gt;&lt;li&gt;&lt;a href="http://scipeople.ru/"&gt;http://scipeople.ru&lt;/a&gt; - social network for scientists and researchers.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-8131660175609258018?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/8131660175609258018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/useful-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/8131660175609258018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/8131660175609258018'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/useful-links.html' title='Useful links'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-5809869329099125565</id><published>2009-02-11T11:51:00.000+03:00</published><updated>2009-02-11T16:32:11.876+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><title type='text'>C++ vs C#</title><content type='html'>I totally hate C++. And every day my hate grows up. But that is not just about my programming language religion. We should look deeper.&lt;div&gt;I know C++ pretty well. I've read all the stuff like &lt;a href="http://www.amazon.com/Effective-Specific-Addison-Wesley-Professional-Computing/dp/0201924889"&gt;Effective C++&lt;/a&gt;, &lt;a href="http://www.amazon.com/More-Effective-Addison-Wesley-Professional-Computing/dp/020163371X"&gt;More Effective C++&lt;/a&gt; and &lt;a href="http://www.amazon.com/Modern-Design-Programming-Patterns-Depth/dp/0201704315/ref=sr_1_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1234347260&amp;amp;sr=1-2"&gt;Modern C++ Design&lt;/a&gt; and understand all of it. And it was really hard. Now I can do amazing things with templates and write robust error-free code. Do I want it? No. It is still really hard for me (and for everyone, I guess) to write, read and maintain such a code. That snippet looks really ugly in C++:&lt;/div&gt;&lt;pre name="code" class="c++"&gt;for (std::vector&amp;lt;double&amp;gt;::iterator it = values.begin();&lt;br /&gt;    it != values.end();&lt;br /&gt;    ++it)&lt;br /&gt; DoStuff(*it);&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;And here is it's C# equivalent:&lt;br /&gt;&lt;/div&gt;&lt;pre name="code" class="c#"&gt;foreach (double value in values)&lt;br /&gt; DoStuff(value);&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;And I'm pretty sure (I have some experience, you know) that 99% of equivalent code pieces are much more simple in C# than in C++. When you read and maintain a lot of code, it is very important.&lt;/div&gt;&lt;div&gt;Next, I hate includes. There is no good reason for good programming language to have such a non-obvious and non-robust way to incorporate different subsystems or just pieces of code. Really! IDE can do it for me! In .NET there are no problems with include paths. And I can just reference some library to get access to it's components. No precompiled headers, no include (or lib) directory setup. That's all about rapid and easy development.&lt;/div&gt;&lt;div&gt;And the last thing that's important for me: in most cases (except of writting &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;really&lt;/span&gt; performance-sensitive code) you should not care about memory deallocation at all. Execution environment can do it for you. Rather quickly. And it does. How much errors have you ever had with memory allocation and deallocation in C++? I have a lot. More than any other kinds of errors. It's like a pain.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But, of course, C++ is fast. Really fast. In computer vision and 3D rendering there are a lot of very performance-sensitive stuff. And the only choise you have is to code it in C++. But don't forget: there are wrappers for everything. There is &lt;a href="http://creators.xna.com/"&gt;XNA&lt;/a&gt;, &lt;a href="http://emgu.com/wiki/index.php/Emgu_CV"&gt;Emgu.CV&lt;/a&gt; and &lt;a href="http://www.gass-ltd.co.il/en/products/cuda.net/"&gt;CUDA.NET&lt;/a&gt;. There is much more than that. You can still write performance-sensitive code in a managed environment with all it's benefits.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I forget to mention wonderful tools for .NET developer such a &lt;a href="http://www.jetbrains.com/resharper/"&gt;Resharper&lt;/a&gt;, &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=9AEAA970-F281-4FB0-ABA1-D59D7ED09772&amp;amp;displaylang=en"&gt;FxCop&lt;/a&gt;, &lt;a href="http://code.msdn.microsoft.com/sourceanalysis"&gt;StyleCop &lt;/a&gt;and many others. There are no technical possibilities to create such a useful and powerful tool for a non-managed language like C++.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's sum up:&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;.NET (C#)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Easy language to code, read and maintain.&lt;/li&gt;&lt;li&gt;No problems with library version control, includes and stuff.&lt;/li&gt;&lt;li&gt;Fast and robust garbage collection.&lt;/li&gt;&lt;li&gt;Very powerful standart library.&lt;/li&gt;&lt;li&gt;Cool IDE and tools.&lt;/li&gt;&lt;li&gt;Quite fast.&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;C++&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Really &lt;/span&gt;fast.&lt;/li&gt;&lt;li&gt;There is &lt;a href="http://boost.org/"&gt;Boost&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt;So that's my proposal: when you want to code something, think about implementing it in C# first and consider C++ as the last option. I'm pretty sure you'll like it as much as I do.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-5809869329099125565?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/5809869329099125565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/c-vs-c.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/5809869329099125565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/5809869329099125565'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/c-vs-c.html' title='C++ vs C#'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-343551499071966910</id><published>2009-02-10T14:13:00.000+03:00</published><updated>2009-02-10T15:32:14.393+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='classification'/><title type='text'>Chinese, Japanese or Korean?</title><content type='html'>Today I've found an interesting site &lt;a href="http://www.blogger.com/www.alllooksame.com"&gt;AllLookSame.com&lt;/a&gt;. There is a test on web page that allows you to check your skills in recognizing Chinese, Korean and Japanese people faces. And I've failed that test. I've guessed only 4 of 20 people. Less than a quarter. Maybe computer can do it much more better?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That would be really interesting to train intensity-based SVM classifier or, probably, boosted classifier based on haar or sparse features that can told us if given face is Korean, Japanese or Chinese. But that will require training set of Asian faces with ground truth. Because of my inability to distinguish such faces I can't do it on my own.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But if I found such a face database some day, I swear I'll do my little research.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-343551499071966910?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/343551499071966910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/chinese-japanese-or-korean.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/343551499071966910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/343551499071966910'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/chinese-japanese-or-korean.html' title='Chinese, Japanese or Korean?'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5488219695306771177.post-1595366143605145446</id><published>2009-02-10T12:37:00.000+03:00</published><updated>2009-02-10T15:35:41.908+03:00</updated><title type='text'>Let us start</title><content type='html'>Good day. Let me introduce myself.&lt;div&gt;I'm student of &lt;a href="http://www.msu.ru/en/"&gt;Moscow State University&lt;/a&gt;, department of computational math and cybernetics. My research interests are data mining, machine learning, computer vision and 3d rendering. I'm also working as a research engineer in a research department of &lt;a href="http://bsgraphics.ru/"&gt;BS Graphics&lt;/a&gt; company located in Moscow. But I'm not all about science, math and all the stuff many people call weird and freaky.&lt;/div&gt;&lt;div&gt;So the main post topics in this blog will be my research, interesting science news and my freaky thoughts about math. But there will be also some kewl rock'n'roll stuff too. I'm pretty sure we'll have a lot of fun there.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5488219695306771177-1595366143605145446?l=sexdrugsandappliedscience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sexdrugsandappliedscience.blogspot.com/feeds/1595366143605145446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/let-us-start.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/1595366143605145446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5488219695306771177/posts/default/1595366143605145446'/><link rel='alternate' type='text/html' href='http://sexdrugsandappliedscience.blogspot.com/2009/02/let-us-start.html' title='Let us start'/><author><name>hr0nix</name><uri>http://www.blogger.com/profile/13453327552688241601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
