{"id":1204496,"date":"2023-11-19T10:30:36","date_gmt":"2023-11-19T15:30:36","guid":{"rendered":"https:\/\/www.prime-wow.com\/?p=1204496"},"modified":"2023-11-19T10:30:36","modified_gmt":"2023-11-19T15:30:36","slug":"stadium-card-stunts-and-the-art-of-programming-a-crowd","status":"publish","type":"post","link":"https:\/\/www.prime-wow.com\/?p=1204496","title":{"rendered":"Stadium card stunts and the art of programming a crowd"},"content":{"rendered":"<p>With college bowl season just around the corner, football fans across the nation will be dazzled, not just by the on-field action, but also by the intricate &#8220;card stunts&#8221; performed by members of the stadium&#8217;s audience. The highly-coordinated crowd work is capable of producing detailed images that resemble the pixelated images on computer screens \u2014 and which are coded in much the same manner.\u00a0\u00a0<\/p>\n<p>Michael Littman&#8217;s new book, <a data-i13n=\"elm:affiliate_link;sellerN:Amazon;elmt:;cpos:1;pos:1\" href=\"https:\/\/shopping.yahoo.com\/rdlw?merchantId=66ea567a-c987-4c2e-a2ff-02904efde6ea&amp;siteId=us-engadget&amp;pageId=1p-autolink&amp;featureId=text-link&amp;merchantName=Amazon&amp;custData=eyJzb3VyY2VOYW1lIjoiV2ViLURlc2t0b3AtVmVyaXpvbiIsImxhbmRpbmdVcmwiOiJodHRwczovL3d3dy5hbWF6b24uY29tL0NvZGUtSm95LUV2ZXJ5b25lLVNob3VsZC1Qcm9ncmFtbWluZy9kcC8wMjYyNTQ2Mzk2Lz90YWc9Z2RndDBjLXAtby00enotMjAiLCJjb250ZW50VXVpZCI6ImQwN2I0MTA2LTE2ODItNGNjNC1hZGQzLTlmYzFjMDFmM2YyOSJ9&amp;signature=AQAAATO3DRGAnGSPLwNKbtoKosAOp353OkKavQKR-2a0BDn3&amp;gcReferrer=https%3A%2F%2Fwww.amazon.com%2FCode-Joy-Everyone-Should-Programming%2Fdp%2F0262546396%2F\" class=\"rapid-with-clickid\" data-original-link=\"https:\/\/www.amazon.com\/Code-Joy-Everyone-Should-Programming\/dp\/0262546396\/\"><em>Code to Joy: Why Everyone Should Learn a Little Programming<\/em><\/a>, is filled with similar examples of how the machines around us operate and how we need not distrust an automaton-filled future so long as we learn to speak their language (at least until they finish learning ours). From sequencing commands to storing variables, <em>Code to Joy<\/em> provides an accessible and entertaining guide to the very basics of programming for fledgling coders of all ages.\u00a0\u00a0<\/p>\n<p><span id=\"end-legacy-contents\" \/><\/p>\n<figure><img decoding=\"async\" src=\"\" data-crop-orig-src=\"https:\/\/s.yimg.com\/os\/creatr-uploaded-images\/2023-10\/b746d790-77a0-11ee-b9b6-e5a5f7084447\" style=\"height:1500px;width:2000px\" alt=\"Code to Joy cover\" data-uuid=\"9a55761d-59ed-358b-8d03-b8fa2d6a0dcf\" \/><figcaption \/>\n<div class=\"photo-credit\">MIT Press<\/div>\n<\/figure>\n<p><em>Excerpted from <\/em><a data-i13n=\"cpos:2;pos:1\" href=\"https:\/\/mitpress.mit.edu\/9780262546393\/code-to-joy\/\">Code to Joy: Why Everyone Should Learn a Little Programming<\/a><em> by Michael L Littman. Published by MIT Press. Copyright \u00a9 2023 by Michael L Littman. All rights reserved.<\/em><\/p>\n<hr \/>\n<h2>\u201cGIMME A BLUE!\u201d<\/h2>\n<p>Card stunts, in which a stadium audience holds up colored signs to make a giant, temporary billboard, are like flash mobs where the participants don\u2019t need any special skills and don\u2019t even have to practice ahead of time. All they have to do is show up and follow instructions in the form of a short command sequence. The instructions guide a stadium audience to hold aloft the right poster-sized colored cards at the right time as announced by a stunt leader. A typical set of card-stunt instructions begins with instructions for following the instructions:\u00a0<\/p>\n<ul>\n<li>\n<p>listen to instructions carefully\u00a0<\/p>\n<\/li>\n<li>\n<p>hold top of card at eye level (not over your head)\u00a0<\/p>\n<\/li>\n<li>\n<p>hold indicated color toward field (not facing you)\u00a0<\/p>\n<\/li>\n<li>\n<p>pass cards to aisle on completion of stunts (do not rip up the cards)<\/p>\n<\/li>\n<\/ul>\n<p>These instructions may sound obvious, but not stating them surely leads to disaster. Even so, you know there\u2019s gotta be a smart alec who asks afterward, \u201cSorry, what was that first one again?\u201d It\u2019s definitely what I\u2019d do.\u00a0<\/p>\n<p>Then comes the main event, which, for one specific person in the crowd, could be the command sequence:\u00a0<\/p>\n<ol>\n<li>\n<p>Blue\u00a0<\/p>\n<\/li>\n<li>\n<p>Blue\u00a0<\/p>\n<\/li>\n<li>\n<p>Blue\u00a0<\/p>\n<\/li>\n<\/ol>\n<p>Breathtaking, no? Well, maybe you have to see the bigger picture. The whole idea of card stunts leverages the fact that the members of a stadium crowd sit in seats arranged in a grid. By holding up colored rectangular sign boards, they transform themselves into something like a big computer display screen. Each participant acts as a single picture element\u2014 person pixels! Shifts in which cards are being held up change the image or maybe even cause it to morph like a larger-than-life animated gif.\u00a0<\/p>\n<p>Card stunts began as a crowd-participation activity at college sports in the 1920s. They became much less popular in the 1970s when it was generally agreed that everyone should do their own thing, man. In the 1950s, though, there was a real hunger to create ever more elaborate displays. Cheer squads would design the stunts by hand, then prepare individual instructions for each of a thousand seats. You\u2019ve got to really love your team to dedicate that kind of energy. A few schools in the 1960s thought that those newfangled computer things might be helpful for taking some of the drudgery out of instruction preparation and they designed programs to turn sequences of hand-drawn images into individualized instructions for each of the participants. With the help of computers, people could produce much richer individualized sequences for each person pixel that said when to lift a card, what color to lift, and when to put it down or change to another card. So, whereas the questionnaire example from the previous section was about people making command sequences for the computer to follow, this example is about the computer making command sequences for <em>people<\/em> to follow. And computer support for automating the process of creating command sequences makes it possible to create more elaborate stunts. That resulted in a participant\u2019s sequence of commands looking like:<\/p>\n<ul>\n<li>\n<p>up on 001 white\u00a0<\/p>\n<\/li>\n<li>\n<p>003 blue\u00a0<\/p>\n<\/li>\n<li>\n<p>005 white\u00a0<\/p>\n<\/li>\n<li>\n<p>006 red\u00a0<\/p>\n<\/li>\n<li>\n<p>008 white\u00a0<\/p>\n<\/li>\n<li>\n<p>013 blue\u00a0<\/p>\n<\/li>\n<li>\n<p>015 white\u00a0<\/p>\n<\/li>\n<li>\n<p>021 down\u00a0<\/p>\n<\/li>\n<li>\n<p>up on 022 white\u00a0<\/p>\n<\/li>\n<li>\n<p>035 down\u00a0<\/p>\n<\/li>\n<li>\n<p>up on 036 white\u00a0<\/p>\n<\/li>\n<li>\n<p>043 blue\u00a0<\/p>\n<\/li>\n<li>\n<p>044 down\u00a0<\/p>\n<\/li>\n<li>\n<p>up on 045 white\u00a0<\/p>\n<\/li>\n<li>\n<p>057 metallic red\u00a0<\/p>\n<\/li>\n<li>\n<p>070 down<\/p>\n<\/li>\n<\/ul>\n<p>Okay, it\u2019s still not as fun to read the instructions as to see the final product\u2014in this actual example, it\u2019s part of an animated Stanford \u201cS.\u201d To execute these commands in synchronized fashion, an announcer in the stadium calls out the step number (\u201cForty-one!\u201d) and each participant can tell from his or her instructions what to do (\u201cI\u2019m still holding up the white card I lifted on 36, but I\u2019m getting ready to swap it for a blue card when the count hits 43\u201d).\u00a0<\/p>\n<p>As I said, it\u2019s not that complicated for people to be part of a card stunt, but it\u2019s a pretty cool example of creating and following command sequences where the computer tells us what to do instead of the other way around. And, as easy as it might be, sometimes things still go wrong. At the 2016 Democratic National Convention, Hillary Clinton\u2019s supporters planned an arena-wide card stunt. Although it was intended to be a patriotic display of unity, some attendees didn\u2019t want to participate. The result was an unreadable mess that, depressingly, was supposed to spell out \u201cStronger Together.\u201d\u00a0<\/p>\n<p>These days, computers make it a simple matter to turn a photograph into instructions about which colors to hold up where. Essentially, any digitized image is already a set of instructions for what mixture of red, blue, and green to display at each picture position. One interesting challenge in translating an image into card-stunt instructions is that typical images consist of millions of colored dots (megapixels), whereas a card stunt section of a stadium has maybe a thousand seats. Instead of asking each person to hold up a thousand tiny cards, it makes more sense to compute an average of the colors in that part of the image. Then, from the collection of available colors (say, the classic sixty-four Crayola options), the computer just picks the closest one to the average.\u00a0<\/p>\n<p>If you think about it, it\u2019s not obvious how a computer can average colors. You could mix green and yellow and decide that the result looks like the spring green crayon, but how do you teach a machine to do that? Let\u2019s look at this question a little more deeply. It\u2019ll help you get a sense of how computers can help us instruct them better. Plus, it will be our entry into the exciting world of machine learning.\u00a0<\/p>\n<p>There are actually many, many ways to average colors. A simple one is to take advantage of the fact that each dot of color in an image file is stored as the amount of red, green, and blue color in it. Each component color is represented as a whole number between 0 and 255, where 255 was chosen because it\u2019s the largest value you can make with eight binary digits, or bits. Using quantities of red-blue-green works well because the color receptors in the human eye translate real-world colors into this same representation. That is, even though purple corresponds to a specific wavelength of light, our eyes see it as a particular blend of green, blue, and red. Show someone that same blend, and they\u2019ll see purple. So, to summarize a big group of pixels, just average the amount of blue in those pixels, the amount of red in those pixels, and the amount of green in those pixels. That basically works. Now, it turns out, for a combination of physical, perceptual, and engineering reasons, you get better results by squaring the values before averaging, and square rooting the values after averaging. But that\u2019s not important right now. The important thing is that there is a mechanical way to average a bunch of colored dots to get a single dot whose color summarizes the group.\u00a0<\/p>\n<p>Once that average color is produced, the computer needs a way of finding the closest color to the cards we have available. Is that more of a burnt sienna or a red-orange? A typical (if imperfect) way to approximate how similar two colors are using their red-blue-green values is what\u2019s known as the Euclidean distance formula. Here\u2019s what that looks like as a command sequence:<\/p>\n<ul>\n<li>\n<p>take the difference between the amount of red in the two colors square it\u00a0<\/p>\n<\/li>\n<li>\n<p>take the difference between the amount of blue in the two colors square it\u00a0<\/p>\n<\/li>\n<li>\n<p>take the difference between the amount of green in the two colors square it add the three squares together\u00a0<\/p>\n<\/li>\n<li>\n<p>take the square root<\/p>\n<\/li>\n<\/ul>\n<p>So to figure out what card should be held up to best capture the average of the colors in the corresponding part of the image, just figure out which of the available colors (blue, yellow green, apricot, timberwolf, mahogany, periwinkle, etc.) has the smallest distance to that average color at that location. That\u2019s the color of the card that should be given to the pixel person sitting in that spot in the grid.\u00a0<\/p>\n<p>The similarity between this distance calculation and the color averaging operation is, I\u2019m pretty sure, just a coincidence. Sometimes a square root is just a square root.\u00a0<\/p>\n<p>Stepping back, we can use these operations \u2014 color averaging and finding the closest color to the average \u2014 to get a computer to help us construct the command sequence for a card stunt. The computer takes as input a target image, a seating chart, and a set of available color cards, and then creates a map of which card should be held up in each seat to best reproduce the image. In this example, the computer mostly handles bookkeeping and doesn\u2019t have much to do in terms of decision-making beyond the selection of the closest color. But the upshot here is that the computer is taking over some of the effort of writing command sequences. We\u2019ve gone from having to select every command for every person pixel at every moment in the card stunt to selecting images and having the computer generate the necessary commands.\u00a0<\/p>\n<p>This shift in perspective opens up the possibility of turning over more control of the command-sequence generation process to the machine. In terms of our 2 \u00d7 2 grid from chapter 1, we can move from telling (providing explicit instructions) to explaining (providing explicit incentives). For example, there is a variation of this color selection problem that is a lot harder and gives the computer more interesting work to do. Imagine that we could print up cards of any color we needed but our print shop insists that we order the cards in bulk. They can only provide us with eight different card colors, but we can choose any colors we want to make up that eight. (Eight is the number of different values we can make with 3 bits \u2014 bits come up a lot in computing.) So we could choose blue, green, blue-green, blue-violet, cerulean, indigo, cadet blue, and sky blue, and render a beautiful ocean wave in eight shades of blue. Great!\u00a0<\/p>\n<p>But then there would be no red or yellow to make other pictures. Limiting the color palette to eight may sound like a bizarre constraint, but it turns out that early computer monitors worked exactly like that. They could display any of millions of colors, but only eight distinct ones on the screen at any one time.\u00a0<\/p>\n<p>With this constraint in mind, rendering an image in colored cards becomes a lot trickier. Not only do you have to decide which color from our set of color options to make each card, just as before, but you have to pick which eight colors will constitute that set of color options. If we\u2019re making a face, a variety of skin tones will be much more useful than distinctions among shades of green or blue. How do we go from a list of the colors we wish we could use because they are in the target image to the much shorter list of colors that will make up our set of color options?\u00a0<\/p>\n<p>Machine learning, and specifically an approach known as clustering or unsupervised learning, can solve this color-choice problem for us. I will tell you how. But first let\u2019s delve into a related problem that comes from turning a face into a jigsaw puzzle. As in the card-stunt example, we\u2019re going to have the computer design a sequence of commands for rendering a picture. But there\u2019s a twist\u2014the puzzle pieces available for constructing the picture are fixed in advance. Similar to the dance-step example, it will use the same set of commands and consider which sequence produces the desired image.<\/p>\n<p>This article originally appeared on Engadget at https:\/\/www.engadget.com\/hitting-the-books-code-to-joy-michael-l-littman-mit-press-153036241.html?src=rss&#013;<br \/>\n&#013;<br \/>\nSource: Engadget &#8211; <a href=\"https:\/\/www.engadget.com\/hitting-the-books-code-to-joy-michael-l-littman-mit-press-153036241.html?src=rss\" target=\"_blank\" rel=\"noopener\">Stadium card stunts and the art of programming a crowd<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With college bowl season just around the corner, football fans across the nation will be dazzled, not just by the on-field action, but also by the intricate &#8220;card stunts&#8221; performed by members of the stadium&#8217;s audience. The highly-coordinated crowd work &hellip; <a href=\"https:\/\/www.prime-wow.com\/?p=1204496\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[99,110],"tags":[98],"class_list":["post-1204496","post","type-post","status-publish","format-standard","hentry","category-engadget","category-unfiltered-rss","tag-engadget"],"_links":{"self":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts\/1204496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1204496"}],"version-history":[{"count":0,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts\/1204496\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1204496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1204496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1204496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}