Tuesday, 22 October 2013

Every Tech Community Needs To Exclude Sexism, So Constraint Programming Should Exclude Sexism

Update 23 Oct: I am thrilled to say that the very next day after getting my email, the local organisers of CP 2014 (Christine Solnon and Yves Deville) have agreed to implement an anti-harassment policy, and to investigate child care possibilities for the conference. That's my points 1 and 3 immediately agreed to, and I couldn't be more thrilled.  Many thanks. 

It's not too often that syllogisms are useful in everyday life, but this is one occasion.
  • Every tech community must eliminate sexism.
  • Constraint programming is a tech community. 
  • Therefore constraint programming must eliminate sexism.
I've been in constraint programming for almost 20 years, but it's only recently that the necessity of the first point was brought home to me, because of what's been happening in the Ruby community.

Here's a tweet: 

    You know what? Women are seriously worrying if it's ethical to advise women to go into Ruby.  Here's a followup to that tweet, from spinnerin
    "We need allies to speak up and show their support for a Ruby community that is welcoming to all participants, not only the privileged majority."
    If you don't know why this has recently come to the fore in the Ruby community, lucky you.  Put it this way: somebody has deleted her blog post about her sexual assault at codemash, because she does not want her claim to fame to be the woman who was sexually assaulted at codemash. 

    I'm not in the Ruby community, but I am in the Constraint Programming community. It's a great community, and many of my best friends are in this community, men and women. But that doesn't mean we can't be better.  We can be better and we must be better.


    As a man in the constraint programming, it's time to stop worrying about appearing to be politically correct, and it's time to stop thinking that maybe sexism isn't a major problem in constraints because we are all nice people. It's time to start being the first line of defence for women.  It's time to start figuring out how to make women's time in constraints better, to the benefit of those women (because working on constraints is super-fun) and for everybody (because women do superb work in constraints.) 


    Here are some thoughts on how we can make constraints - and especially the constraint programming conference - a better place for women and other historically disadvantaged groups.  The next conference will be in Lyon, in 2014, and I have some specific suggestions. 


    Before I get to this, let me say that I don't think Constraints is a particularly bad research area for women.  Apart from anything else, the third winner of the ACP research excellence award was a woman (Rina Dechter), and the first winner of the ACP distinguished service award was a woman (Francesca Rossi). On the other hand, it's not that great either. This year, for example, the Programme Committee of CP 2013, counting Senior and Technical committees, comprised 61 people, if I counted right. The number of women in the world on this committee? 4.  The number of men on the committee who work on the same corridor as me in St Andrews?  4.  And this is from a programme chair (Christian Schulte) who ran a brilliant programme and who I would be astonished to find was sexist.



    1. Implement a Conference Anti Harassment Policy

    Honestly, this is a no brainer. We should have a conference anti-harassment policy. This is not just for the protection of women attendees. Conference volunteers need to know what to do if something bad happens.  But let the good people at geekfeminism make the case:

    "Why have an official anti-harassment policy for your conference? First, it is necessary (unfortunately). Harassment at conferences is incredibly common - for example, see this timeline of sexist incidents in geek communities. Second, it sets expectations for behavior at the conference. Simply having an anti-harassment policy can prevent harassment all by itself. Third, it encourages people to attend who have had bad experiences at other conferences. Finally, it gives conference staff instructions on how to handle harassment quickly, with the minimum amount of disruption or bad press for your conference."
    And it's not hard to write an anti-harassment policy, because you can copy and paste it! 

    We should make CP 2014 the first Artificial Intelligence conference on this page (though perhaps other confs have had a good policy but have not made it to that page yet.) 

    If we can't do this, we can't advise women to attend CP 2014 or any other future conference.  


    2. Make Sure At Least One Woman Is An Invited Speaker 

    At CP 2009, there were two female invited speakers out of three.  They were Barbara Smith and Carla Gomes.   In the four years since there have been thirteen invited talks, with one female speaker (Michela Milano in 2013).  One of 13 is not great is it, people?

    One invited speaker per year in a historically disadvantaged group is not a lot to ask. Yes, I know, this starts to sound like positive discrimination, doesn't it? Maybe you don't like positive discrimination. 

    But think about it this way.  Do we need to work to make sure at least one speaker is a man? No. Every single year in the history of CP, at least one invited speaker has been a man. (Believe it or not, I've checked this statement, even though it hardly needed checking.)  On the other hand, in three of the last four years there have been zero women.   And since 2009 is the only year there was more than one woman, that's the only year in history that women outnumbered men among invited speakers at the major constraint programming conference.  

    Oh, by the way, if you really really can't think of any other women to invite, ask some of the same ones again!  They're great.  Oh I know, we couldn't have the same ones again, could we? Well, not unless they were men like Moshe Vardi (2002 and 2010) or Peter Stuckey (2005 and 2013) or Pascal van Hentenryck (1997 and 2013) or Helmut Simonis (2004 and 2006) or Alain Colmerauer (2001 and 2008) or George Nemhauser (1996 and 2002).  That's twelve invited talks by men who have given two invited talks each. The same number of men have given two invited talks as women who have given any. Compared with six invited talks by women.  

    You really don't want the same ones again?  Still stuck?

    What about Zeynep Kiziltan? She'd be great.  Or Inês Lynce? She'd be great. Or Karen Petrie? She'd be great. None of these are junior people. You might have better ideas since I've only picked people I'm close to (written papers with Karen and 
    Inês, highly connected to Zeynep via Ian Miguel and others.) 


    Update 22 Oct 2013: What I've said here is stronger than what is recommended by this FAQ at "forgenderequityatconferences". I certainly agree with that FAQ that if good faith effort to invite women is made, that would be acceptable even if no woman eventually appears.  However I'm leaving the text above as it originally was because it's what I wrote and I do think that good faith efforts could be rewarded with success, at least for next year.

    Some disclosure: I was chair of CP 2009 and invited Barbara and Carla.  But I claim no credit for inviting women, only for inviting people who I thought would be the best.  Carla had just started up  Computational Sustainability, a very hot topic and was recommended by more than one member of the programme committee. And if I was biased towards Barbara, it was as an old friend who had (incomprehensibly to me) never been asked to give a keynote despite being the best constraint modeller in the world. 

    3. Make sure childcare is available

    Are you prevented from going to a conference because of childcare problems? No? Great! Let's make sure nobody else is either. If you have a child, they might love attending CP. But if you have to travel alone, maybe because you are a single parent, you need to know that childcare is available. This is a gender-blind problem but it is likely to differentially affect women.  

    I don't think CP 2014 needs to have a childcare centre on site. But I do think that we should make sure that proper childcare facilities are available and linked to.  What this means depends on the local organisers, so they might be a childcare centre, or there might be trustworthy carers who could do childcare for a fee.   

    Hey, you know what, I know most people don't need this.  And people could organise it themselves... but ... everybody could organise their own hotel.  It's still nice to have a bunch of conference hotels to make our lives easier.  Same thing with childcare. Though of course finding reliable childcare in a strange city in a foreign country is much harder than finding a decent hotel.  If childcare makes the difference between attending or not, having it linked to from the conference site could make the difference between attending or not, and then attending that inspirational talk or making that critical contact which changes your career.


    4. Make it affordable if you're disadvantaged

    What is one of the great successes of the CP community?  I would say it was the CP Doctoral Program. This has helped literally hundreds of people attend CP, people who were potentially disadvantaged by being junior people studying for a PhD and without their own funds. By reaching out to these people we have brought them into the community to meet other researchers.  The CP community has been happy to help them financially, by accepting larger conference fees for everybody else.

    What a great and wonderful thing! 

    Before you ask, no I don't want lower conference fees for women. 

    But financial help with childcare? Help for disabled people, like maybe paying for travel for a helper? Yes. Let's help them just like we have helped so many graduate students. It won't cost much, and if it did cost a lot it would be fantastic for the community.


    5. Let's celebrate the Petrie Multiplier

    I recently wrote about the Petrie Multiplier. This blog post has had about 25,000 page views (which I understand to be a lot for a noname blogger), and been tweeted about hundreds of times. It's a simple model which explains how sexism is magnified by the gender disparity in a field like tech (or subfield like constraints).  But you know what, it's an idea invented by a constraint programmer (Karen Petrie) and written about by a constraint programmer (me).  

    Let's understand that in constraints, where women are in the minority, just being in the minority can lead to dramatically more sexism per woman, and to men not seeing that sexism. 

    This is not a major contribution from constraints to eliminating sexism, but it is something.  Let's celebrate it, by making sure we are one of the communities that leads tech in getting rid of sexism.  


    6. Make a commitment to gender equity at conferences like Constraint Programming 


    I've signed the commitment to gender equity at conferences. Please do so too. There's an FAQ available.


    7. Let's not argue about whether sexism is a problem

    I'll be really happy to argue about how to fix the sexist problem we have. I don't even mind if you don't call it sexism (call it "gender imbalance" or "inclusiveness" or anything you like).  


    But please don't argue that we don't have a problem. Here's the best two ways I can put this point. 



    I started thinking I should write this post a week or two ago.  Or rather, I thought I should send a letter to the most relevant people (organisers of CP 2014.)  But it's too important for that, so I'm posting it here.

    Update: here is the letter I actually am sending to the relevant people: 


    Dear Yves, Christine, Barry, Pierre and Helmut 

    As local chairs and program chair of CP 2014, and conference coordinator and president of the Association for Constraint Programming.   

    I wish to propose that the Association for Constraint Programming commit to  moving towards gender equality at CP 2014 and all future conferences. 

    By far the most important point (in my opinion) is to adopt a strong anti-harassment policy, to prevent events such as have recently been tearing the Ruby community apart.   But there are other good things we could and should do.

    You can read my reasons for suggesting this, and concrete suggestions on my blog at http://iangent.blogspot.co.uk/2013/10/every-tech-community-needs-to-exclude.html

    Very best wishes

    Ian 

    Sunday, 20 October 2013

    The Computer Scientist and the Cleaner 2: Multimedia Extravaganza Edition


    The Computer Scientist and the Cleaner is a parable about gender in Computer Science. The story is this:
    "The computer scientist and the cleaner had a long and happy marriage. One of their few arguments was when she forgot their wedding anniversary. But their marriage was strong and he forgave her." 
    The point of the story is to think about gender preconceptions in CS, as an introduction to a talk to first year student computer scientists I planned to give on gender balance and inclusiveness. I wrote about it in this previous post  and got amazing feedback from... 


    ... many people at St Andrews, a historian at the University of Dundee, two Readers, a software engineer and a postdoc from Edinburgh University, the former chair of BCS Women, the first female professor at St Andrews, a New York Times bestselling children's author, an antiques dealer in Wales, the Oxford University Student's Union LGBT officer, a high school teacher in Denmark, a postdoc at Liverpool, a freelance photographer, a beer researcher from Heriot Watt, my wife and daughters, a rocket scientist from NASA, a developer at a startup in New York, and the Chief Scientific Advisor to the Scottish Government. 

    This feedback came from the blog post, twitter, and facebook, as well as in person, so it's an example of social media really helping dramatically in my work. 

    Last friday I gave the talk to First Year Computer Scientists.  A video recording and the slides are below. 

    How did it go?  

    I annoyed myself by overrunning, which is a bad habit I have of not being able to shut up until slightly too late (though at least not very much too late).  

    A new Women in Computing group is being set up in the School and I invited the organiser (a student) to introduce it. She also sent me feedback which was really interesting, and amongst other things told me that the students were at least paying serious attention during the talk. I'd arranged three ways for students to discuss the issue afterwards. I set up a private blog post in the School of Computer Science, I sat in a tutorial room open to discussions, and I invited private emails to me. 

    There wasn't a lot of feedback.  I got three emails being very supportive, one negative comment on the blog post saying it was unnecessary and a waste of time, and one person came to talk to me. The person who I chatted with brought me a book to look at, Little Miss Geek, which looks good so I ordered my own copy. 

    I had wondered if there would be a lot of negative pushback from men, and there certainly wasn't. Indeed if my talk was a waste of time because everybody already gets it, that would be brilliant. I'm torn between being delighted that people were so accepting, and thinking that maybe people were not accepting but just didn't want to argue with somebody in a position of power (as first-year coordinator), and if that was the case it would be completely understandable. Finally, I expect I get less pushback for the simple fact of being a man, which I've called (very bad name) male geek feminist ally privilege.

    If you are considering giving a talk like this, the result is that there's not a lot of advice I can give you. However you are welcome to borrow my slides if you wish, and if you want the originals (keynote) do get in touch with me.

    Here's a playlist from youtube of the talk, of the slides and my speaking (no video of the room), with just one or two local references deleted. 



    Here are the slides, with a few of the animation slides deleted to help your sanity clicking through those.







    Tuesday, 15 October 2013

    Male Geek Feminist Ally Privilege Checklist: Or a Different Kind of Ada Lovelace Day Post

    It's Ada Lovelace Day and I thought I would write a post about my favourite computer scientist, who is my wife, Judith Underwood. But I changed my mind.

    One of the things that changed my mind was reading this post, in which some man - quite incredibly in my view - suggests that a male, who acted totally inappropriately to a woman and who has since admitted it, should not be named.   There's a LOT of backstory to that, but apart the two things that struck me about this post was the combination of (1) saying that it's wrong to warn woman of facts about a man who sexually harrassed a woman, and (2) the writing of the post as anguished crie-de-couer about this poor sensitive soul's (who was neither the victim nor the harrasser) agonising about how rude to be about the sexually harrassed woman, and whether to do it in public or not.  I didn't change my mind because I don't understand where this guy is coming from - I do.  I changed my mind because I am starting to understand how this would make women feel who read about it.

    Recently I've written a couple of posts about gender equality and sexism in tech and computing:
    The Petrie Multiplier and The Computer Scientist and the Cleaner.  These have been very well received and I've been really gratified by the response.

    Some of the reaction has been wonderful: for example a facebook friend of a friend saying I should have a t-shirt saying "This is what a feminist looks like" was lovely.  Just like a tweet saying there should be a Geek Feminism Wiki page about the Petrie Multiplier.

    Worst moment?  Seeing my 13 year old daughter read the seven links about recent sexism events at the start of The Petrie Multiplier and knowing that I shouldn't stop her.


    Ten days ago I didn't know about the concept of a feminist ally, and very little about the notion of privilege in the  context of sexism.  I know a bit more, so here are a selected few of the privileges of being a geek feminist ally.  Selected because they are the few I've realised over the last week or so.
    • You discover more about women geek friend's experiences by them telling you for the first time in your life... instead of having lived them
    • People are interested instead of dismissive that you think gender equality is important 
    • When you get thousands of pageviews and hundred of tweets about your gender equality post, nobody calls you a bitch 
    • If you get depressed reading about sexism towards geek women, you can stop reading... and not get groped on the train home 
    And I'm going to finish with an Ada Lovelace Day themed bullet point:
    • If you didn't have a computer scientist heroine early in your career, you didn't notice at the time
    So Happy Ada Lovelace Day.

    But a p.s.: please do look at my only previous Ada Lovelace Day post about my mother.


    Sunday, 13 October 2013

    The Petrie Multiplier: Why an Attack on Sexism in Tech is NOT an Attack on Men

    This image is explained below.
    Image links to large nonlooping animation.
    Looping version also available.
    If you don't think sexism in Tech and Computer Science is a major problem, you really have not been paying attention. The seven links in the last sentence are to seven different incidents displaying appalling sexism - or worse - in Tech, so may upset you. And in case you feel my selection does not include some of the "best", i.e. worst, incidents, that's because I have selected these seven just from the last two months.

    So it's everybody's responsibility to attack sexism in Tech. Unfortunately, this can often be viewed as an attack on men.  

    So we need a powerful argument that an attack on sexism in Tech is not an attack on men. 

    Here it is.  I call it the Petrie Multiplier. 

    The wonderful thing about the Petrie Multiplier is that there is nothing in it about men being worse people or more sexist than women. And still we get women experiencing dramatically more sexism than men. It's because of the gender disparity in Tech, and the fact that this multiplies up to the detriment of the minority group. 

    The Petrie Multiplier is the amazing effect that the amount of sexism experienced by women compared to men goes as the square of the gender ratio in Tech. And this is assuming that women are equally sexist towards men as men are towards women.  

    The Petrie Multiplier is not hard to explain, so I'll do it in this post.  It was invented by Karen Petrie, but named by me since she is not so immodest to call it after herself!  

    Let's say that we have 20% women and 80% men in Tech.  And that 20% of people make inappropriate remarks or other sexist moves towards people of the opposite gender.  So 20% of men make sexist remarks to women, and 20% of women make sexist remarks to men.  

    Let's start with 50 people.  Here's a picture, where the darker squares are people who make sexist remarks and the lighter circles are people who don't.  Pink is for men, and blue for women.  Given the 20% ratios, we have 40 men and 10 women, and 8 of the 40 men sometimes make sexist remarks towards women, while 2 of the 10 women make sexist remarks to men. I can't emphasise enough that there is no difference in sexism between the genders.  


    Women are blue and men are pink, of course, because those are the gender-appropriate colours. As has been said, "The generally accepted rule is pink for the boys, and blue for the girls. The reason is that pink, being a more decided and stronger color, is more suitable for the boy, while blue, which is more delicate and dainty, is prettier for the girl." That was said in 1918, so think about that change over the last 100 years if you think that some other difference (e.g. gender ratio in Tech) cannot be changed.  

    But if you really hate dealing with pink=man, there's a pink=woman version at the end of this post.
    Now we'll let some sexist remarks start flowing. I'll indicate this by an arrow from one of the dark square boxes to one of the people of the opposite gender.



    The first one is a man (near the bottom), being sexist towards a woman (near the top).  The second is a woman on the right being sexist to a man.  The lengths of arrows have no significance, but are just chosen by the graph layout program. 

    Let's see what happens when we have had 70 sexist remarks made.  



    Let's look at the difference between the experience of men and women. It's pretty stark. 

    The luckiest man receives zero sexist remarks.  But in fact he doesn't need to be very lucky, because most men receive no remarks.  There is an unlucky guy (bottom right) who receives three sexist remarks, as it happens from the same woman. That is not acceptable, and she should stop. But that's the unluckiest guy out of 40.  

    The luckiest woman receives four sexist remarks.  So let's get this straight: the luckiest woman out of 10 experiences worse sexism than the unluckiest man out of 40. 

    Of course it gets worse. The unluckiest woman experiences nine incidents.  On average? The mean number of sexist remarks per man is 0.35, while for women it is 5.6.  There's a gender disparity of 4:1 but the disparity in experience is 16:1.

    Men are no more sexist than women in this thought experiment, but women's experience is sixteen times worse than the men's.

    The maths that explains this is simple. With 20% women the gender ratio is 1:4.  So there are 4 times as many men to make sexist remarks, so 4 times as many sexist remarks are made to women as to men. But there are 4 times fewer women to receive sexist remarks, so each individual woman is four times as likely to receive a given remark than an individual man is.  These effects multiply, so in this example the mean number of sexist remarks per woman is 16 times the number per man.  This holds in general, so with a gender ratio of 1:r, women will receive r2 times as many sexist remarks as men. 

    That is the Petrie Multiplier. An argument that an attack on sexism in Tech is NOT an attack on men. 


    Image links to larger animated gif without looping.


    Update: One of the first comments I got was that the pink/blue swap was confusing.  So here is a version with the colours swapped to the current gender-colour stereotypes instead of the ones from 95 years ago.

    Update 20 October 2013.  Here's a video of me talking about the Petrie Multiplier to our students, part of a longer talk. 

    Update 20 October 2013: One of the most common remarks on the Petrie Multiplier is that men have a quota of sexist remarks to make, so have to seek out women to make them to.  David Chart has run a model which eliminates that problem, but gets similar results.  Blog Post here




    p.s. In case you're wondering about who Karen Petrie is, she's a senior lecturer in Computer Science at Dundee University.  Is she a geek? These photos might help you decide.

    Karen Petrie in St Andrews on her wedding day, flanked by her wedding cakes, or more properly wedding pixels. Karen is blonde and wore a light dress, but has never needed rescuing from a castle. Her husband is indeed dark haired but does not wear a moustache and has been known to pay other people to do plumbing.Images © Ian Gent, 2008.
    Reusable under a Creative Commons License
    Creative Commons Licence





    Credits: Thanks to Karen for the effect of course, plus Chris Jefferson for helping with a python script to generate the random graphs.  

    Copyright: All images are created by me, but I am putting all images of the Petrie Multiplier into the public domain so they can be used freely, while the photos on this page are licensed CC.

    If somebody has come across the Petrie Multiplier under a different name, i.e. if somebody invented it before Karen, please let me know so I can give them credit.


    Sunday, 6 October 2013

    The Computer Scientist and The Cleaner

    Let me tell you a story
    The computer scientist and the cleaner had a long and happy marriage. One of their few arguments was when she forgot their wedding anniversary.  But their marriage was strong and he forgave her.
    It's not a great story, but it's a story.

    Now let me ask you a question.

    Who forgot the anniversary?  Was it the computer scientist or the cleaner?

    The answer doesn't matter.  What matters is: when you read it did your brain make you think that the computer scientist was male and the cleaner was female? 

    For an unbiased view, let's ask Google Images about computer scientists and cleaners. The answer is clear: computer scientists are men, and cleaners are women. 

    We've got a problem: we, meaning everyone in computer science.  The problem is twofold. There's a major gender imbalance in computer science. And that women are often not treated right. It's a very widely known problem, and in fact I think it's the most important problem for computer science.  (Not the most important problem in computer science, but for it.)

    I've been thinking about gender issues in computing because I am first year co-ordinator in the School of Computer Science at the University of St Andrews. It suddenly occurred to me that I have a responsibility to new students to tell them about the most important problem for computer science. 

    So I decided I should prepare a talk to give to first year students, both men and women, to tell them about this major problem, and some small pointers on what to do about it.

    A draft talk is below, but here are a few of the key points.
    I know of only two good reasons we need more women in computer science
    • It’s right
    • Computer Science would be better
    • this point being that since some women don't get into CS or leave early, the average quality of CS would go up with more women in it. 
    What should people in CS do about it?
    1. Don't be a jerk to women 
    2. Don't use sexist language 
    3. Understand it's not you who decides if you are doing 1 or 2
    We need males in CS to be Allies
    Allies?  Basically an ally is a non-female who thinks that both men and women should be treated right in CS. See the geekfeminism wiki for some pointers. 
    Don't get me wrong. 
    I want all our male students to have fun and do brilliantly in their CS degrees and afterwards.  It's just that I want the same for female students and other disadvantaged groups.  And I want us to work together to reduce those disadvantages.
    So here is my talk, embedded below or direct at SlideShare.  



    If you want to comment, please do comment here, or by email to me, whatever you want.  I'm obviously especially interested in any ways I can improve the talk (apart from making it shorter, which I know it needs to be).  Given this topic can be sensitive, I will remove what I regard as offensive comments without hesitation.


    Credits: This is my own work and I take full responsibility but helpful comments have been received from: Kate Cross (special credit for suggesting anniversary instead of a car crash in the story), Perdita Stevens, Vicky Larmour, Karen Petrie, Ursula Martin, Louise Dennis, Julian Bradfield, Dave Berry, Judith Underwood, Chris Jefferson, Jeremy Frank, Juliana Bowles.   (There are actually many others who have commented usefully, and I will add you here happily if I've omitted you.)

    [Update: 6 Oct 2013: following comments from two friends, I have made some changes to this post and the draft talk.  This was removing some of the more personal material and changing the story from a car crash to an anniversary.

    Update 2: 7 Oct 2013.  Changed "in computer science" to "for computer science"

    Update 3: 7 Oct 2013.  To my horror realised that I was guilty of cissexism since the FLORIN slide implied gender was binary.  Have removed this.   There are also many other changes I want to make in this based on other comments but this was the most urgent.

    Update 4: 9 Oct 2013.  Quite a number of changes.

    Update 5: 12 Oct 2013. Added many slides about the Petrie Multiplier.

    Update 6: 20 Oct 2013. Slides as delivered to students at St Andrews, with one or two minor deletions of local information.

    As I am changing this talk and it's in the open, I thought I would make available earlier versions.  Here are version 1, version 2, version 3, version 4, version 5, and version 6 (the version delivered to students in Oct 2013.]

    Sunday, 22 September 2013

    How I became one of the three "best optimizers in the world"

    Eternal Glory

    One of the three best optimizers in the world?  

    A direct quote. And I'm one of three because our winning team - Mano - comprised me, Allen van Gelder and Ian Miguel won the First International Lightning Model and Solve competition. The competition web page said (boldface theirs).
    The main aim of the competition is to have fun, and earn the eternal glory of the title of "best optimizers in the world".
    Medal given to the winning team.It is, of course, not true. The key quote is the part not in bold: it was having fun.  It was a great piece of fun and winning really made my conference (it was at CP2013).  And it was really fun that the three of us, just using paper and pen beat nine other teams who had the best optimizing software in the world at their fingertips.  

    Let me tell you how it happened and what we can learn from the experience.

    Before I do that let me thank very much the organisers, Peter Stuckey, Farshid Hassani Bijarbooneh, and Håkan Kjellerstrand.  


    Two Days Earlier


    Allen van Gelder wandered up to me and asked me whether I'd like to join his team for the modelling competition.  The conversation was simple.  I said no, I was going to skip it.  He said "We're going to solve the problems by hand" and I said "Yes" and he said "I thought you would." So I became the second member of team Mano: Spanish for hand.  

    Solving hard combinatorial problems by hand is something I enjoy a lot and something I have a bit of a reputation for.  In two cases I've solved open benchmark problems which had not been solved by any mechanical technique.   I might use a computer to do bits of bookkeeping, but not the hard yards of the search problem.  


    Word Gets Around


    One of the really fun aspects of the conference was that people kept coming up to me and saying "I hear you're going to enter the modelling competition by hand."  Those who really know me well asked me if I was going to take any whisky in: they know that I enjoy doing this kind of thing with a glass of whisky by my side.

    The teams were of size three.  So I suggested that Ian Miguel join us.  He was harder to persuade than I had been, because he owed somebody a paper review, but eventually he joined in to complete the team Mano. 

    Just before the competition, Bilal Hussain asked me what he thought our chances of winning were.  I said "Zero percent".  This was honest but maybe a little exaggerated, since I knew it wasn't zero.  But I thought it was very low.  Remember the bit where everybody else could use the best modelling and solving tools in the world? 

    The Competition


    I'm delighted that the organisers have put the contest materials online so you can follow along.

    Ten teams gathered for the competition briefing.  We were given a copy of the rules.  The key point was the scoring system, which meant that getting valid answers in early was good.  This was useful for those of us playing by hand because we could scribble down something quickly while other teams would be coding.   Unfortunately we had to enter our answers by file on a usb stick, which would slow us down from our pencil and paper.  

    A key point of the competition is that only one laptop was allowed per team of three.  This made the critical bottleneck the keyboard.  A modern laptop can do serious solving and also editing files at the same time, but two people can't type on the same keyboard at the same time (despite this ludicrous scene from NCIS.) 

    The other key point was the scoring system: you got a point for each team you beat if you submitted a valid solution, even if a terrible one.  You beat a team if you got a better solution or you got the same quality of solution in earlier.

    At start time we were allowed to turn over and read the problem descriptions.   We had already been given the USB stick with the instance data on it.  There were 6 classes with five instances in each class.  

    The first problem was dealing with the 10 pages of detailed description.  We did rip up the sheets but the page breaks were not at the start of a problem, making it harder.  There was a lot to take in.  In fact I think at no point did any of the three of us seriously read the powerup or smelt problem classes, and we only scanned quickly the doubleclock family.   

    The first problem we started working on quasi seriously was the queens problem, and this became Ian Miguel's problem - though this was not immediate.  We first realised we had an answer to instance 0 as we could copy it out from the question sheet.  However we then had the disappointment that there was no points for the instances 0, they were there as test data if we wanted them.  Then I told Ian the next instance was for board size 6, which he quickly solved.  The next disappointment was the realisation that this was wrong, the next instance was 7.   Without taking too long he solved that and then we typed it in the required format and took it to the front. 

    This was nice because when we had our first correct solution confirmed we got a chocolate each!  Nice in itself but since nobody else had got one yet we knew we were the first to get a solution in, and so at that point technically in the lead.

    A really good aspect of the competition was that you could get your solutions checked instantly. This meant that you either knew you were ok or you could work on fixing it. Spectacularly good was that you got an explanation of the mistake in automated fashion, so double kudos to Peter Stuckey for doing that.  This really helped us in one case.

    Ian then continued working on queens problems, and eventually we submitted solutions for three instances (sizes 7, 11, and 16).  By 16 the fact that we did not have any graph paper was a real disadvantage!  But we got there: though non optimally as it turns out in each case. 

    Allen decided to work on the seatplan problems, which he did using pen, paper, and the scissors he had brought.  With this he cut up bits of paper which he used for the individuals in the problem.  He did get a solution to the first instance, but unfortunately we'd made a transcription error in copying it from screen to paper - a problem of the hand approach though one might make a reading bug in a program.   He resolved this one with the right data and got a solution in time, but that was the only seatplan problem we solved.

    After a while buzzing around I settled in to read the zamkeller description which was not very clear.  Since I have done work on permutations before and this involved permutations, this seemed natural.  Eventually I got it in my head (despite the mistakes in the original description, now corrected online).  When I did it became relatively simple, so I was able to cobble together something for the smallest two instances fairly fast, and (thanks to the instant checking) be sure they were correct (though not necessarily optimal.)  Since the instances got bigger I did write a little lisp program (shock horror, yes there was some computer assistance!) to write out the numbers in the sequences I wanted.   As I worked on this a general solution dawned on me which I was sure is optimal.  So I programmed this in, did a bit of editing of the output and got the third submitted, and when that was correct I quickly did the others and got the last instances submitted.   While I did use a computer here a bit, it was never used for any solving, and if I had been allowed I could have submitted entries on paper for the big instances (up to 3000 numbers) with a formula written out.

    By the time each of us had done our last problem we were very nearly out of time.   


    What Happened Next


    We had been told we would get the results immediately the competition closed, but they changed their minds and said they would announce the results at the conference banquet.    

    This was when I got my first inkling we might be doing well, because Peter mentioned that four of the ten groups had not submitted any correct instances.  This was a big surprise and since by then we knew we had submitted nine correct instances, we thought we could be doing well.  

    After the banquet Peter stood up to announce the scores in reverse order, and since he went through every team that had scored, our excitement grew (I was sitting next to Ian Miguel but not Allen).   When the second place was announced we of course knew we had won, and a few moments later went up to collect an inscribed medal and a nice certificate.  So again many thanks for those mementos.

    I certainly wore that medal all night, but much to my friends surprise I have not worn it since :)

    Here's the blog post (thanks Håkan!) reporting that we won.

    Why did we win?


    A few people have - I hope jokingly - commented that this is a sad reflection on constraint programming, with its 20th annual conference next year, that a bunch of guys with pen and paper can beat the state of the art.  But (if they were not joking) I don't agree.  People can solve hard problems and the lightning nature of the competition meant it was like a race between a bike and a car: the bike can accelerate quicker but after a while the car will overtake.  Also, once the problems are modelled an unending sequence of instances can be solved.  

    So having defended Constraint Programming as an art, let me tell you why Mano won. 

    We understood very early on that quick and dirty answers were advantageous.  So we got our 7x7 queens solution in as soon as we could.  Indeed, since we were at the back, we ended up running up and down the stairs a lot.   It was worth the short break from work to get the feedback and our entry logged in case another team got the same quality solution to an instance later.

    Another point was that we didn't spend too long looking for true optimal solutions, so for example none of our queens solutions were optimal (we found out in retrospect) but an optimal solution for 11x11 would have got us fewer points than Ian's non-optimal solution for 16x16.

    One really powerful advantage we had over other teams was that we could parallel search three ways.  For much of the time we had people working on three problems independently.  This was a big thing as it meant we got entries into three different problem classes.   I don't know how other teams worked but this would have been more difficult, and especially with resulting contention for the key bottleneck - the keyboard.   For us there were only brief periods of typing and Allen had brought plenty of paper. 

    On their own I think these advantages would have got us into the top three competitors.  We got the gold medal because I worked out the general solution to the zamkeller instances and therefore could submit solutions even to the huge instances.

    There are things we could have done better.  Mainly I think none of us really read all the problem descriptions.  So for example I only glanced at the powerup instances, and only later realised they were quite amenable to hand solution.   If Allen had brought a pack of cards I think we could have done very well on the doubleclock instances!   Analogue tools can be useful.  But since we ran out of time, it's not obvious if we could have exploited these advantages. 

    We were very beatable: the way to have done this would have been twofold.  First set somebody on something like the queens problems where hand solutions can be obtained, reducing contention. And second, look for cases where easy programs could be written to generate feasible if bad solutions for all the instances in a class. As Peter Stuckey pointed out at the banquet, the identity permutation has pessimal score zero in zamkeller, but would have got many points since other teams didn't attempt it.   This way constraint modelling is reserved for the cases it will really pay off, since time is so limited.  


    What have we learnt for next year? 


    I enjoyed this and I hope it happens again.  I've given away some tips if you are entering next year.  What about the organisers?  Peter told me he thought the problems were too hard. Actually I disagree, but probably it is true that they took to long to read and understand.  Ten pages of fairly dense material was a lot, and as I've said even the winning group's examination technique was bad, as we did not read all the problems in detail.  

    What Have We Learnt For Constraint Programming?


    One word. Modelling.

    To expand, Modelling is hard.

    To expand, we need better tools to make it easier to model constraint problems quickly.   
    Every group should have been able to use a simple constraints tool to model the easier problems (like queens) and then get on with the other ones. 

    This is what I take away, and it's nice that this is research that we in St Andrews are already doing, so I hope we can push this harder after this experience.