{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2025-12-14T01:33:56.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":1246,"title":"PACMAT 05 - Optimized Ghosts, PACMAT increasing speed, 12 Lives","description":"The Classic PACMAN game brought to Cody.\r\n\r\nPACMAT requires clearing the Yellow Dots while avoiding the wandering ghosts in 12 lives. Adjacent Ghosts will capture PACMAT.  Ghosts do not use the tunnel. On Ghost capture everyone gets reset. These trained ghosts take the minimum path to PACMAT assuming the other Ghosts are walls.  PACMAT gets faster as a function of captures. \r\n\r\n\u003c\u003chttps://sites.google.com/site/razapor/matlab_cody/PACMAT_300.jpg\u003e\u003e\r\n\r\nTo aid in development of your routine, a PACMAT_Ghosts_005.m file that creates a video has been posted at \u003chttps://sites.google.com/site/razapor/matlab_cody/PACMAT_Ghosts_005.m PACMAT_Ghosts_005.m\u003e. (Right click, 'save link as'). Using patches thus enable/figure,  disable/video for best results.\r\n\r\n\r\n\u003chttps://sites.google.com/site/razapor/matlab_cody/PACMAT_G005_video_ANC4_dbltunnel.mp4 Alfonso Enhanced\u003e (MP4) Alfonso clears at 2X speed with multiple tunnel usages.\r\n\r\n\r\n*Inputs:* Map   Definitions: -1=Wall, 0=Empty, 1=Dot, 2=PACMAT, \u003e2=Ghost\r\n\r\n*Output:* Direction  Definitions: 1-Up, 2-Right, 3-Down, 4-Left, 0-No move\r\n\r\n*Pass Criteria:* Clear all dots\r\n\r\n*Scoring:* \r\n\r\n  score = F(Lives Remaining) + moves\r\n\r\n  F = [ 9000 8000 7500 7000 6500 4000 3000 2000 1000 500 100 0]  \r\n\r\n*Note:* Speed as function of Lives remaining [12 8 6 4 3 2 2 2 2 2 2 1];\r\n\r\n\r\n*Future:* Asteroids\r\n","description_html":"\u003cp\u003eThe Classic PACMAN game brought to Cody.\u003c/p\u003e\u003cp\u003ePACMAT requires clearing the Yellow Dots while avoiding the wandering ghosts in 12 lives. Adjacent Ghosts will capture PACMAT.  Ghosts do not use the tunnel. On Ghost capture everyone gets reset. These trained ghosts take the minimum path to PACMAT assuming the other Ghosts are walls.  PACMAT gets faster as a function of captures.\u003c/p\u003e\u003cimg src=\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_300.jpg\"\u003e\u003cp\u003eTo aid in development of your routine, a PACMAT_Ghosts_005.m file that creates a video has been posted at \u003ca href=\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_Ghosts_005.m\"\u003ePACMAT_Ghosts_005.m\u003c/a\u003e. (Right click, 'save link as'). Using patches thus enable/figure,  disable/video for best results.\u003c/p\u003e\u003cp\u003e\u003ca href=\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_G005_video_ANC4_dbltunnel.mp4\"\u003eAlfonso Enhanced\u003c/a\u003e (MP4) Alfonso clears at 2X speed with multiple tunnel usages.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInputs:\u003c/b\u003e Map   Definitions: -1=Wall, 0=Empty, 1=Dot, 2=PACMAT, \u003e2=Ghost\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Direction  Definitions: 1-Up, 2-Right, 3-Down, 4-Left, 0-No move\u003c/p\u003e\u003cp\u003e\u003cb\u003ePass Criteria:\u003c/b\u003e Clear all dots\u003c/p\u003e\u003cp\u003e\u003cb\u003eScoring:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003escore = F(Lives Remaining) + moves\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eF = [ 9000 8000 7500 7000 6500 4000 3000 2000 1000 500 100 0]  \r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eNote:\u003c/b\u003e Speed as function of Lives remaining [12 8 6 4 3 2 2 2 2 2 2 1];\u003c/p\u003e\u003cp\u003e\u003cb\u003eFuture:\u003c/b\u003e Asteroids\u003c/p\u003e","function_template":"function  [newdir]=pacmat(map)\r\n% raz 314\r\n persistent ptr\r\n if isempty(ptr)\r\n  ptr=['bbbbbbbcccbbbbbcccdddddddddddddddddddddddddaaa'...\r\n      'bbbbbaaaaaaaaaaaaaaaaaaaaaaaaadddddcccccccbbbbddddaaabbbbbbbb'...\r\n     'cccbbbdddaaabbbaaaadddddbbbbbccccbbbbbbbbbbbbbbaaaaddddddddddd'...        'ccccbbbcccdddbbbaaabbbaaaccccccbbbbbaaccdddddccccccccccccccaabbbbbcccddccc'...\r\n'dddaaaaaaddddddcccbbbcccdddcccdddaaadddaaaddbbbbbaaadddddddddddcccbbccc'];\r\n  ptr=(ptr-'a')+1;\r\n end\r\n  \r\n newdir=ptr(1);\r\n ptr(1)=[];\r\nend","test_suite":"%%\r\nfeval(@assignin,'caller','score',10000);\r\n%%\r\nmax_moves=4000; % Expect \u003c 1000\r\n\r\nmap=[...\r\n      repmat('a',1,28);\r\n      'accccccccccccaacccccccccccca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acccccccccccccccccccccccccca';\r\n      'acaaaacaacaaaaaaaacaacaaaaca';\r\n      'acaaaacaacaaaaaaaacaacaaaaca';\r\n      'accccccaaccccaaccccaacccccca';\r\n      'aaaaaacaaaaabaabaaaaacaaaaaa';\r\n      'aaaaaacaaaaabaabaaaaacaaaaaa';\r\n      'aaaaaacaabbbbbbbbbbaacaaaaaa';\r\n      'aaaaaacaabaaabbaaabaacaaaaaa';\r\n      'aaaaaacaabalbbbblabaacaaaaaa';\r\n      'bbbbbbcbbbabbbbbbabbbcbbbbbb';\r\n      'aaaaaacaabalbbbblabaacaaaaaa';\r\n      'aaaaaacaabaaaaaaaabaacaaaaaa';\r\n      'aaaaaacaabbbbbbbbbbaacaaaaaa';\r\n      'aaaaaacaabaaaaaaaabaacaaaaaa';\r\n      'aaaaaacaabaaaaaaaabaacaaaaaa';\r\n      'accccccccccccaacccccccccccca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acccaacccccccbdcccccccaaccca';\r\n      'aaacaacaacaaaaaaaacaacaacaaa';\r\n      'aaacaacaacaaaaaaaacaacaacaaa';\r\n      'accccccaaccccaaccccaacccccca';\r\n      'acaaaaaaaaaacaacaaaaaaaaaaca';\r\n      'acaaaaaaaaaacaacaaaaaaaaaaca';\r\n      'acccccccccccccccccccccccccca';\r\n      repmat('a',1,28);];\r\n  \r\n  map=map-'b';\r\n  [nr, nc]=size(map);\r\n\r\n  gmap=map; % Map used by ghosts to simplify PAC Capture\r\n  gmap(15,6)=Inf; %No tunnel ghosts\r\n  gmap(15,26)=Inf;\r\n  gmap(map==-1)=Inf; % walls to Inf\r\n  gmap(map\u003e2)=Inf; % Elim start points as viable moves, quicker box exit\r\n\r\n\r\n  mapdelta=[-1 nr 1 -nr]; % Valid as long as not on an edge\r\n  gmovxy=[0 -1;1 0;0 1;-1 0];\r\n\r\n  tunnel=find(map(:,1)==0); % tunnelptr\r\n  tunnel=[tunnel tunnel+nr*(nc-1)]; % Entrance/Exit Tunnel\r\n\r\n  [pmr, pmc]=find(map==2); % pi 24 row  pj 15 column of map\r\n   ptrpac=find(map==2);\r\n\r\n  ptrpac=find(map==2);\r\n  ptrpac_start=ptrpac;\r\n  ptrg_start=find(map\u003e2);\r\n  map(ptrg_start)=[10 20 30 40];\r\n  [gstartx, gstarty]=find(map\u003e2);\r\n  \r\n  lives=12; % Lives\r\n  speed=[12 8 6 4 3 2 2 2 2 2 2 1]; % Faster as fewer lives remain\r\n  movepac=0;\r\n\r\nwhile lives \u0026\u0026 any(mod(map(:),10)==1) \u0026\u0026 movepac\u003cmax_moves\r\n\r\n for pac2x=1:speed(lives) % G05 Mod\r\n  if ~(lives \u0026\u0026 any(mod(map(:),10)==1)),continue;end % Died or completed\r\n \r\n movepac=movepac+1;\r\n\r\n [curdir]=pacmat(map);\r\n [pmr, pmc]=find(map==2);\r\n\r\nif curdir\u003e0\r\n if map(ptrpac+mapdelta(curdir))==-1\r\n  % Do nothing - Ran into a Wall\r\n elseif map(ptrpac+mapdelta(curdir))\u003e2 % ran into ghost\r\n  map(ptrpac)=0; % remove PAC from the board\r\n  lives=lives-1;\r\n  if lives==0,break;end\r\n  % reset the board\r\n  [ptrgx, ptrgy]=find(map\u003e2);\r\n  ptrg=find(map\u003e2);\r\n  map(ptrg)=mod(map(ptrg),10);\r\n  map(ptrpac_start)=2;\r\n  map(ptrg_start)=[10 20 30 40];\r\n  ptrpac=find(map==2);\r\n  continue;\r\n else % legal move\r\n  map(ptrpac)=0; % Eat Dot and clear PAC\r\n  ptrpac=ptrpac+mapdelta(curdir);\r\n  if ptrpac==tunnel(1),ptrpac=tunnel(2)-nr;end\r\n  if ptrpac==tunnel(2),ptrpac=tunnel(1)+nr;end\r\n  map(ptrpac)=2;\r\n end\r\nend % curdir \u003e0\r\nend % pac2X Speed Loop\r\n\r\n% Ghosts\r\n for i=1:4\r\n\r\n  ghosts=find(map\u003e2);\r\n  ptrpac=find(map==2); % Target\r\n\r\n  dot=false;\r\n  [gptrx, gptry]=find(map==10*i);\r\n  gidx=find(map==10*i);\r\n  if isempty(gidx)\r\n   [gptrx, gptry]=find(map==10*i+1); % ghost must be on a dot\r\n   gidx=find(map==10*i+1);\r\n   dot=true;\r\n  end\r\n\r\n% Find valid ghost moves using gmap\r\n% mapdelta=[-1 nr 1 -nr]; \r\n  gmov=find(map(gidx+mapdelta)==2); % adjacent to PACMAT\r\n  if ~isempty(gmov) % PAC adjacent\r\n   lives=lives-1;\r\n   if lives==0,break;end\r\n   % reset the board\r\n   [pmr, pmc]=find(map==2); % PACMAT erase coords\r\n   map(map==2)=0;\r\n      \r\n   [ptrgx, ptrgy]=find(map\u003e2);\r\n   ptrg=find(map\u003e2);\r\n   map(ptrg)=mod(map(ptrg),10);\r\n   map(ptrpac_start)=2;\r\n   map(ptrg_start)=[10 20 30 40];\r\n   ptrpac=find(map==2);     \r\n   break; % Ghost move loop\r\n      \r\n  else % gmap no tunnel usage, Walls\r\n \r\n   gmap=map; gmap(15,1)=-1;gmap(15,28)=-1;\r\n       \r\n   ptctr=0;\r\n   gmap(gmap\u003e=0)=Inf;\r\n   \r\n% Ghost algor change   \r\n   gmap(ghosts)=-1; % other ghosts are like walls Ghosts_004/5\r\n    gmap(gidx)=Inf; % Ultimate target\r\n    gmap(ptrpac)=1; % Start at PACMAT and expand to ghost\r\n    while gmap(gidx)\u003e101 \u0026\u0026 ptctr\u003c100 % potential boxed dot\r\n % find dots, add a counter to distance form location, keep min value\r\n % when ptrpac gets a value it will be from nearest dot\r\n % find side with dmap(ptrpac)-1\r\n     ptctr=ptctr+1;\r\n     dpts=find(gmap==ptctr);\r\n     newpt_idx=repmat(dpts,1,4)+repmat(mapdelta,length(dpts),1);\r\n     gmap(newpt_idx(:))=min(gmap(newpt_idx(:)),ptctr+1);\r\n    end\r\n\r\n% Simplified by ghosts are walls: No Ghost Jumping\r\n    if ~isinf(gmap(gidx)) % Path(s) to Ghost found\r\n     for gmov=1:4 % execute with a find?\r\n       if gmap(gidx+mapdelta(gmov))==gmap(gidx)-1,break;end\r\n      end\r\n     else\r\n      gmov=[];\r\n     end\r\n \r\n   if ~isempty(gmov) % valid g move : ghost may not stand on ghost\r\n    map(gptrx,gptry)=mod(map(gptrx,gptry),10);\r\n    map(gidx+mapdelta(gmov))=map(gidx+mapdelta(gmov))+10*i;     \r\n   end % ~isempty(gmov) standard move - no capture\r\n\r\n  end % ~isempty(gmov) PACMAT adjacent\r\n  \r\n end % i ghost moves\r\nend % while alive\r\n%\r\n\r\nassert(lives\u003e0,sprintf('Twelve Captures\\n')) % ) Lives allowed\r\nassert(~isempty(any(mod(map(:),10)==1)),sprintf('Moves\\n',movepac)) \r\n\r\nscore_array=[ 9000 8000 7500 7000 6500 4000 3000 2000 1000 500 100 0];\r\nscore=score_array(lives) + movepac;\r\n  \r\nfprintf('Moves %i\\n',movepac)\r\nfprintf('Lives Remaining %i\\n',lives)\r\nfprintf('Score %i\\n',score)\r\n\r\n\r\nfeval( @assignin,'caller','score',floor(min( 10000,score )) );\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-02-03T22:19:40.000Z","updated_at":"2026-03-30T18:42:31.000Z","published_at":"2013-02-03T23:04:48.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.JPEG\"}],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Classic PACMAN game brought to Cody.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePACMAT requires clearing the Yellow Dots while avoiding the wandering ghosts in 12 lives. Adjacent Ghosts will capture PACMAT. Ghosts do not use the tunnel. On Ghost capture everyone gets reset. These trained ghosts take the minimum path to PACMAT assuming the other Ghosts are walls. PACMAT gets faster as a function of captures.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTo aid in development of your routine, a PACMAT_Ghosts_005.m file that creates a video has been posted at\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_Ghosts_005.m\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePACMAT_Ghosts_005.m\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. (Right click, 'save link as'). Using patches thus enable/figure, disable/video for best results.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_G005_video_ANC4_dbltunnel.mp4\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eAlfonso Enhanced\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (MP4) Alfonso clears at 2X speed with multiple tunnel usages.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInputs:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Map Definitions: -1=Wall, 0=Empty, 1=Dot, 2=PACMAT, \u0026gt;2=Ghost\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Direction Definitions: 1-Up, 2-Right, 3-Down, 4-Left, 0-No move\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePass Criteria:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Clear all dots\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eScoring:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[score = F(Lives Remaining) + moves\\n\\nF = [ 9000 8000 7500 7000 6500 4000 3000 2000 1000 500 100 0]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Speed as function of Lives remaining [12 8 6 4 3 2 2 2 2 2 2 1];\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eFuture:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Asteroids\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"},{\"partUri\":\"/media/image1.JPEG\",\"contentType\":\"image/JPEG\",\"content\":\"data:image/JPEG;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEsASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDzfW9Yl0ySFYkRw4J+bPHNZX/CWXX/ADwh/X/Gn+Lv9dbf7h/nWRcX0c+nWlq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8a09Rf2TP8AmRw9lepaR3SPZW1yZ4jGGmBJiJ/iTBHzfXIqlg+lejf2fZ/8+sP/AHwKPsFn/wA+sP8A3wKFw5Vu/fX4j/sip/MjhdQu1v8AUZLqOzgtFkIxBbqRGnGOAST2z1rvof8Aj3i/3B/KovsFn/z6w/8AfAqwQB8o6DgV6+U5ZPBOXNK97HfgcHKg5Xe5/9k=\"}]}"},{"id":54715,"title":"Weird Diagonal Matrix!!","description":"**If you have loved the problem, please like it below(Request)**\r\nGiven an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n.\r\nFor example:\r\nn=2\r\nz =\r\n\r\n     1     0     0\r\n     0     2     2\r\n     0     2     2\r\nn=3\r\nz =\r\n\r\n     1     0     0     0     0     0\r\n     0     2     2     0     0     0\r\n     0     2     2     0     0     0\r\n     0     0     0     3     3     3\r\n     0     0     0     3     3     3\r\n     0     0     0     3     3     3","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 427.344px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 406.493px 213.663px; transform-origin: 406.493px 213.672px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e**If you have loved the problem, please like it below(Request)**\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eGiven an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eFor example:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003en=2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 102.083px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 403.507px 51.0417px; transform-origin: 403.507px 51.0417px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ez =\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     1     0     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     2     2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     2     2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003en=3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 163.333px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 403.507px 81.6667px; transform-origin: 403.507px 81.6667px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ez =\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     1     0     0     0     0     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     2     2     0     0     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     2     2     0     0     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     0     0     3     3     3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     0     0     3     3     3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     0     0     3     3     3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function z=diagMatrix(x)\r\n\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(diagMatrix(x),y_correct))\r\n%%\r\nx=3;\r\ny_correct = [     1     0     0     0     0     0\r\n     0     2     2     0     0     0\r\n     0     2     2     0     0     0\r\n     0     0     0     3     3     3\r\n     0     0     0     3     3     3\r\n     0     0     0     3     3     3];\r\nassert(isequal(diagMatrix(x),y_correct))\r\n%%\r\nx = 4;\r\ny_correct = [1     0     0     0     0     0     0     0     0     0\r\n     0     2     2     0     0     0     0     0     0     0\r\n     0     2     2     0     0     0     0     0     0     0\r\n     0     0     0     3     3     3     0     0     0     0\r\n     0     0     0     3     3     3     0     0     0     0\r\n     0     0     0     3     3     3     0     0     0     0\r\n     0     0     0     0     0     0     4     4     4     4\r\n     0     0     0     0     0     0     4     4     4     4\r\n     0     0     0     0     0     0     4     4     4     4\r\n     0     0     0     0     0     0     4     4     4     4]\r\n%%\r\nx=8;\r\ny_correct = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8];\r\nassert(isequal(diagMatrix(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":1274403,"edited_by":1274403,"edited_at":"2022-06-13T18:48:46.000Z","deleted_by":null,"deleted_at":null,"solvers_count":19,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-06-06T04:17:20.000Z","updated_at":"2026-01-28T13:05:07.000Z","published_at":"2022-06-06T04:39:45.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e**If you have loved the problem, please like it below(Request)**\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGiven an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eFor example:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003en=2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[z =\\n\\n     1     0     0\\n     0     2     2\\n     0     2     2]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003en=3\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[z =\\n\\n     1     0     0     0     0     0\\n     0     2     2     0     0     0\\n     0     2     2     0     0     0\\n     0     0     0     3     3     3\\n     0     0     0     3     3     3\\n     0     0     0     3     3     3]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":772,"title":"TRON Tourney 000 : Clockwise Wall Hugger","description":"TRON Tournament is based upon the excellent TRON Challenge, \u003chttp://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge Cody 327\u003e, created by Alfonso Nieto-Castanon.\r\n\r\nI will implement, as practical, winning Player TRON-bots as Host TRON-bots.\r\n\r\nThe Passing criteria is changed to Wins - Ties/4 \u003e Losses.\r\n\r\nThe 100 Matches will be \"even\" as Host and Player will play the same 50 paired starting positions.\r\n\r\nThe Host TRON-bot will be provided in the function template.\r\nIt is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\r\n\r\nThe TRON arena is fixed at 50x50.\r\n\r\nPlease visit the Cody 327 link for any info I may miss.\r\n\r\n\r\nBoard: 50x50\r\n\r\nWall: -3 (Rows 1 and 50, Columns 1 and 50)\r\n\r\nPlayer: 1\r\n\r\nHost: 2\r\n\r\nPlayer created wall: -1\r\n\r\nHost created wall: -2\r\n\r\n\r\nEmpty Spaces: 0\r\n\r\nPlayers start on either row 2 or column 2\r\n\r\nPlayers move simultaneously and thus a crash to the same spot is a tie.\r\n\r\nRunning into walls is a loss. \r\n\r\nSimultaneous wall crashing is a tie.\r\n\r\nGiven the board with its coverage make a Move, \"NESW\".\r\n\r\n\"N\" idx-1; \"E\" idx+50, \"S\" idx+1, and \"W\" is idx-50.\r\n\r\n*Input:* Board\r\n\r\n*Output:* (string 1 character) eg \"N\"\r\n\r\n*Score:* Perfect Score is 0 points (200-Wins*2-Ties/2)\r\n\r\nThe Test Suite has some very nice methods to implement checks.\r\n\r\nBot 000 is Alfonso's Clockwise Exterior Wall Hugger\r\n","description_html":"\u003cp\u003eTRON Tournament is based upon the excellent TRON Challenge, \u003ca href=\"http://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge\"\u003eCody 327\u003c/a\u003e, created by Alfonso Nieto-Castanon.\u003c/p\u003e\u003cp\u003eI will implement, as practical, winning Player TRON-bots as Host TRON-bots.\u003c/p\u003e\u003cp\u003eThe Passing criteria is changed to Wins - Ties/4 \u003e Losses.\u003c/p\u003e\u003cp\u003eThe 100 Matches will be \"even\" as Host and Player will play the same 50 paired starting positions.\u003c/p\u003e\u003cp\u003eThe Host TRON-bot will be provided in the function template.\r\nIt is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\u003c/p\u003e\u003cp\u003eThe TRON arena is fixed at 50x50.\u003c/p\u003e\u003cp\u003ePlease visit the Cody 327 link for any info I may miss.\u003c/p\u003e\u003cp\u003eBoard: 50x50\u003c/p\u003e\u003cp\u003eWall: -3 (Rows 1 and 50, Columns 1 and 50)\u003c/p\u003e\u003cp\u003ePlayer: 1\u003c/p\u003e\u003cp\u003eHost: 2\u003c/p\u003e\u003cp\u003ePlayer created wall: -1\u003c/p\u003e\u003cp\u003eHost created wall: -2\u003c/p\u003e\u003cp\u003eEmpty Spaces: 0\u003c/p\u003e\u003cp\u003ePlayers start on either row 2 or column 2\u003c/p\u003e\u003cp\u003ePlayers move simultaneously and thus a crash to the same spot is a tie.\u003c/p\u003e\u003cp\u003eRunning into walls is a loss.\u003c/p\u003e\u003cp\u003eSimultaneous wall crashing is a tie.\u003c/p\u003e\u003cp\u003eGiven the board with its coverage make a Move, \"NESW\".\u003c/p\u003e\u003cp\u003e\"N\" idx-1; \"E\" idx+50, \"S\" idx+1, and \"W\" is idx-50.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e Board\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e (string 1 character) eg \"N\"\u003c/p\u003e\u003cp\u003e\u003cb\u003eScore:\u003c/b\u003e Perfect Score is 0 points (200-Wins*2-Ties/2)\u003c/p\u003e\u003cp\u003eThe Test Suite has some very nice methods to implement checks.\u003c/p\u003e\u003cp\u003eBot 000 is Alfonso's Clockwise Exterior Wall Hugger\u003c/p\u003e","function_template":"function move=tron(board)\r\n% Creator: Alfonso Nieto-Castanon\r\n% Botname: Base Clockwise Wall Hugger\r\n% Date: Early 2012\r\n% This is the Host bot of TRON Tourney 000\r\n str='NESW';\r\n D=[-1,50,1,-50];\r\n i=find(board==2); \r\n [nill,j]=max(~board(i+D)+.5*(board(i-D)==-2));\r\n move=str(j);\r\nend","test_suite":"%%\r\n% Core Code based upon TRON Cody 327 by Alfonso Nieto-Castanon\r\n% Tweaked to have 50 paired matches that swap starting positions\r\n% Passing Criteria modified to W-Ties/4 \u003e Losses\r\n% 10% of all matches against perfect bot are guaranteed losses\r\nglobal scr\r\n\r\n  doDraw=false; %set to true for display\r\n  %doDraw=true; %set to true for display\r\n  params=struct('n',50,'str','NESW','D',[-1,50,1,-50],'wins',[0,0,0]);\r\n   \r\n  y=clock;\r\n  rand('state',10000*y(6)); \r\n % rand('state',0); % Modify to make non-repeating\r\n  for nboards=1:50 \r\n      % initialize board\r\n      params.board=zeros(params.n);\r\n      params.board([1,end],:)=-3;\r\n      params.board(:,[1,end])=-3;\r\n      [i,j]=find(params.board|1); % creates idx  to [r,c] via magic\r\n      [nill,pos1]=max((i==2|j==2)+~params.board(:)+rand(params.n*params.n,1));\r\n      params.board(pos1)=1;\r\n      [nill,pos2]=max((i==2|j==2)+~params.board(:)+rand(params.n*params.n,1));\r\n      params.board(pos2)=2;\r\n      orig_pos1=pos1;\r\n      orig_pos2=pos2;\r\n   for game=1:2 \r\n       \r\n       if game==2 % Play reversed starting positions\r\n        params.board=zeros(params.n);\r\n        params.board([1,end],:)=-3;\r\n        params.board(:,[1,end])=-3;\r\n        pos1=orig_pos2;\r\n        pos2=orig_pos1;\r\n        params.board(pos1)=1;\r\n        params.board(pos2)=2;\r\n       end\r\n      \r\n      while 1\r\n          % blue's next movement\r\n          params.state=rand('state');\r\n          assignin('caller','params',params);\r\n       try   \r\n        d1=tron(params.board); % Player Move\r\n       catch\r\n        d1='S'; % Move S on error\r\n       end\r\n          \r\n          params=evalin('caller','params');\r\n          rand('state',params.state);\r\n          \r\n          \r\n          % red's next movement\r\n          i=find(params.board==2);\r\n          [nill,j]=max(~params.board(i+params.D)+.5*(params.board(i-params.D)==-2));\r\n          d2=params.str(j);\r\n       \r\n\r\n          % evaluate movements\r\n          d1=findstr(params.str,d1);\r\n          d2=findstr(params.str,d2);\r\n          \r\n          assert(~isempty(d1));          \r\n          params.board(pos1)=-1;\r\n          params.board(pos2)=-2;\r\n          pos1=pos1+params.D(d1);\r\n          pos2=pos2+params.D(d2);\r\n          if pos1==pos2||(params.board(pos1)\u0026\u0026params.board(pos2)), %tie\r\n              params.wins(2)=params.wins(2)+1;\r\n              if doDraw, disp('tie'); end\r\n              break;\r\n          elseif params.board(pos1), %lose\r\n              if doDraw, disp('lose'); end\r\n              %pause(0.5)\r\n              params.wins(3)=params.wins(3)+1;\r\n              break;\r\n          elseif params.board(pos2), %win\r\n              if doDraw, disp('win'); end\r\n              params.wins(1)=params.wins(1)+1;\r\n              break;\r\n          end\r\n          params.board(pos1)=1;\r\n          params.board(pos2)=2;\r\n          if doDraw\r\n              image(4+params.board);\r\n              axis equal off;\r\n              colormap([1,1,1;.5,0,0;0,0,.5;0,0,0;0,0,1;1,0,0]);\r\n              set(gcf,'color','k');\r\n              drawnow;\r\n          end\r\n      end\r\n      if doDraw, pause; end\r\n      \r\n   end % game\r\n  end % nboards\r\n    \r\n  disp(sprintf('%d wins; %d ties; %d losses',params.wins));\r\n\r\n% Make the size equal to 2*score\r\nscr=max(0,100-params.wins(1)-params.wins(2)/4);\r\n\r\n\r\n% W-T/4 \u003e Losses to Pass\r\nassert(params.wins(1)-params.wins(2)/4\u003eparams.wins(3),sprintf('%d wins; %d ties; %d losses',params.wins));\r\n\r\n%fh=fopen('tron.m','wt');\r\n%fprintf(fh,'%s\\n',repmat('1;',[1,floor(scr)]) );\r\n%fclose(fh);\r\n%%\r\nglobal scr\r\n\r\nfeval(@assignin,'caller','score',floor(2*scr));\r\n\r\n%fh=fopen('tron.m','wt');\r\n%fprintf(fh,'%s\\n',repmat('1;',[1,floor(scr)]) );\r\n%fclose(fh);\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":"2012-11-24T16:01:31.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-06-17T02:35:05.000Z","updated_at":"2012-11-24T16:01:31.000Z","published_at":"2012-06-17T04:05:26.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTRON Tournament is based upon the excellent TRON Challenge,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCody 327\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, created by Alfonso Nieto-Castanon.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eI will implement, as practical, winning Player TRON-bots as Host TRON-bots.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Passing criteria is changed to Wins - Ties/4 \u0026gt; Losses.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe 100 Matches will be \\\"even\\\" as Host and Player will play the same 50 paired starting positions.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe TRON arena is fixed at 50x50.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlease visit the Cody 327 link for any info I may miss.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBoard: 50x50\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWall: -3 (Rows 1 and 50, Columns 1 and 50)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer: 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost: 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer created wall: -1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost created wall: -2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEmpty Spaces: 0\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayers start on either row 2 or column 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayers move simultaneously and thus a crash to the same spot is a tie.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRunning into walls is a loss.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSimultaneous wall crashing is a tie.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven the board with its coverage make a Move, \\\"NESW\\\".\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\"N\\\" idx-1; \\\"E\\\" idx+50, \\\"S\\\" idx+1, and \\\"W\\\" is idx-50.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Board\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (string 1 character) eg \\\"N\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eScore:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Perfect Score is 0 points (200-Wins*2-Ties/2)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Test Suite has some very nice methods to implement checks.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBot 000 is Alfonso's Clockwise Exterior Wall Hugger\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":773,"title":"TRON Tourney 010: Fixed Pattern CCW","description":"TRON Tournament is based upon the excellent TRON Challenge, \u003chttp://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge Cody 327\u003e, created by Alfonso Nieto-Castanon.\r\n\r\nHost Bot: Fixed Pattern CCW - Weak \r\n\r\nThe Passing criteria is changed to Wins - Ties/4 \u003e Losses.\r\n\r\nThe 100 Matches will be \"even\" as Host and Player will play the same 50 paired starting positions.\r\n\r\nThe Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\r\n\r\nThe TRON arena is fixed at 50x50.\r\n\r\nPlease visit the Cody 327 link for any info I may miss.\r\n\r\nBoard: 50x50\r\n\r\nWall: -3 (Rows 1 and 50, Columns 1 and 50)\r\n\r\nPlayer: 1\r\n\r\nHost: 2\r\n\r\nPlayer created wall: -1\r\n\r\nHost created wall: -2\r\n\r\nEmpty Spaces: 0\r\n\r\nPlayers start on either row 2 or column 2\r\n\r\nPlayers move simultaneously and thus a crash to the same spot is a tie.\r\n\r\nRunning into a wall first is a loss.\r\n\r\nSimultaneous wall crashing is a tie.\r\n\r\nGiven the board with its coverage make a Move, \"NESW\".\r\n\r\n\"N\" idx-1; \"E\" idx+50, \"S\" idx+1, and \"W\" is idx-50.\r\n\r\n*Input:* Board\r\n\r\n*Output:* (string 1 character) eg \"N\"\r\n\r\n*Score:* Perfect Score is 0 points (200-Wins*2-Ties/2), 100 L scores 200\r\n\r\nThe Test Suite has some very nice methods to implement checks.\r\n\r\nBot 010 is Rick's CCW Fixed Pattern Bot - Weak","description_html":"\u003cp\u003eTRON Tournament is based upon the excellent TRON Challenge, \u003ca href=\"http://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge\"\u003eCody 327\u003c/a\u003e, created by Alfonso Nieto-Castanon.\u003c/p\u003e\u003cp\u003eHost Bot: Fixed Pattern CCW - Weak\u003c/p\u003e\u003cp\u003eThe Passing criteria is changed to Wins - Ties/4 \u003e Losses.\u003c/p\u003e\u003cp\u003eThe 100 Matches will be \"even\" as Host and Player will play the same 50 paired starting positions.\u003c/p\u003e\u003cp\u003eThe Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\u003c/p\u003e\u003cp\u003eThe TRON arena is fixed at 50x50.\u003c/p\u003e\u003cp\u003ePlease visit the Cody 327 link for any info I may miss.\u003c/p\u003e\u003cp\u003eBoard: 50x50\u003c/p\u003e\u003cp\u003eWall: -3 (Rows 1 and 50, Columns 1 and 50)\u003c/p\u003e\u003cp\u003ePlayer: 1\u003c/p\u003e\u003cp\u003eHost: 2\u003c/p\u003e\u003cp\u003ePlayer created wall: -1\u003c/p\u003e\u003cp\u003eHost created wall: -2\u003c/p\u003e\u003cp\u003eEmpty Spaces: 0\u003c/p\u003e\u003cp\u003ePlayers start on either row 2 or column 2\u003c/p\u003e\u003cp\u003ePlayers move simultaneously and thus a crash to the same spot is a tie.\u003c/p\u003e\u003cp\u003eRunning into a wall first is a loss.\u003c/p\u003e\u003cp\u003eSimultaneous wall crashing is a tie.\u003c/p\u003e\u003cp\u003eGiven the board with its coverage make a Move, \"NESW\".\u003c/p\u003e\u003cp\u003e\"N\" idx-1; \"E\" idx+50, \"S\" idx+1, and \"W\" is idx-50.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e Board\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e (string 1 character) eg \"N\"\u003c/p\u003e\u003cp\u003e\u003cb\u003eScore:\u003c/b\u003e Perfect Score is 0 points (200-Wins*2-Ties/2), 100 L scores 200\u003c/p\u003e\u003cp\u003eThe Test Suite has some very nice methods to implement checks.\u003c/p\u003e\u003cp\u003eBot 010 is Rick's CCW Fixed Pattern Bot - Weak\u003c/p\u003e","function_template":"function move=tron(board)\r\n% Creator: Richard Zapor\r\n% BotName: Map50 vs Clockwise Bot\r\n% Fixed Pattern Bot - Very Weak but Crushes CW Wall Hugger\r\n% Date: 6/8/2012\r\n  str='NESW';\r\n  map50=str2num('reshape([ones(1,101)*2 ones(1,46)*3 2 2 zeros(1,2202) 3 4 4 ones(1,47) 3 4 zeros(1,97)],50,50)+(reshape([zeros(1,53) ones(1,44)*3 zeros(1,6) ones(1,44)*4 zeros(1,6) 3 ones(1,43)*4 zeros(1,6) ones(1,43)*2 3 zeros(1,2106) ones(1,44)*2 zeros(1,6) ones(1,44)*2 zeros(1,53)],50,50))''');\r\n  try\r\n   move=str(map50(find(board==1)));  \r\n  catch\r\n   move='S';\r\n  end\r\nend","test_suite":"% Passing Criteria modified to W-Ties/4 \u003e Losses\r\n% 10% of all matches against perfect bot are guaranteed losses\r\nglobal scr\r\n\r\n  doDraw=false; %set to true for display\r\n  %doDraw=true; %set to true for display\r\n  params=struct('n',50,'str','NESW','D',[-1,50,1,-50],'wins',[0,0,0]);\r\n   \r\n  y=clock;\r\n  rand('state',10000*y(6)); \r\n  map50=str2num('reshape([ones(1,101)*2 ones(1,46)*3 2 2 zeros(1,2202) 3 4 4 ones(1,47) 3 4 zeros(1,97)],50,50)+(reshape([zeros(1,53) ones(1,44)*3 zeros(1,6) ones(1,44)*4 zeros(1,6) 3 ones(1,43)*4 zeros(1,6) ones(1,43)*2 3 zeros(1,2106) ones(1,44)*2 zeros(1,6) ones(1,44)*2 zeros(1,53)],50,50))''');\r\n % rand('state',0); % Modify to make non-repeating\r\n  for nboards=1:50 \r\n      % initialize board\r\n      params.board=zeros(params.n);\r\n      params.board([1,end],:)=-3;\r\n      params.board(:,[1,end])=-3;\r\n      [i,j]=find(params.board|1); % creates idx  to [r,c] via magic\r\n      [nill,pos1]=max((i==2|j==2)+~params.board(:)+rand(params.n*params.n,1));\r\n      params.board(pos1)=1;\r\n      [nill,pos2]=max((i==2|j==2)+~params.board(:)+rand(params.n*params.n,1));\r\n      params.board(pos2)=2;\r\n      orig_pos1=pos1;\r\n      orig_pos2=pos2;\r\n   for game=1:2 \r\n       \r\n       if game==2 % Play reversed starting positions\r\n        params.board=zeros(params.n);\r\n        params.board([1,end],:)=-3;\r\n        params.board(:,[1,end])=-3;\r\n        pos1=orig_pos2;\r\n        pos2=orig_pos1;\r\n        params.board(pos1)=1;\r\n        params.board(pos2)=2;\r\n       end\r\n      \r\n      while 1\r\n          % blue's next movement\r\n          params.state=rand('state');\r\n          assignin('caller','params',params);\r\n      try    \r\n        d1=tron(params.board); % Player Move\r\n      catch\r\n        d1='S';\r\n       end\r\n          \r\n          params=evalin('caller','params');\r\n          rand('state',params.state);\r\n          \r\n          \r\n          % red's next movement\r\n% Creator: Richard Zapor\r\n% BotName: Map50 vs Clockwise Bot\r\n% Date: 6/8/2012\r\n  str='NESW';\r\n%  map50=str2num('reshape([ones(1,101)*2 ones(1,46)*3 2 2 zeros(1,2202) 3 4 4 ones(1,47) 3 4 zeros(1,97)],50,50)+(reshape([zeros(1,53) ones(1,44)*3 zeros(1,6) ones(1,44)*4 zeros(1,6) 3 ones(1,43)*4 zeros(1,6) ones(1,43)*2 3 zeros(1,2106) ones(1,44)*2 zeros(1,6) ones(1,44)*2 zeros(1,53)],50,50))''');\r\n  try\r\n   move=str(map50(find(params.board==2)));  \r\n  catch\r\n   move='S';\r\n  end\r\n  d2=move;\r\n       \r\n\r\n          % evaluate movements\r\n          d1=findstr(params.str,d1);\r\n          d2=findstr(params.str,d2);\r\n          \r\n          assert(~isempty(d1));          \r\n          params.board(pos1)=-1;\r\n          params.board(pos2)=-2;\r\n          pos1=pos1+params.D(d1);\r\n          pos2=pos2+params.D(d2);\r\n          if pos1==pos2||(params.board(pos1)\u0026\u0026params.board(pos2)), %tie\r\n              params.wins(2)=params.wins(2)+1;\r\n              if doDraw, disp('tie'); end\r\n              break;\r\n          elseif params.board(pos1), %lose\r\n              if doDraw, disp('lose'); end\r\n              %pause(0.5)\r\n              params.wins(3)=params.wins(3)+1;\r\n              break;\r\n          elseif params.board(pos2), %win\r\n              if doDraw, disp('win'); end\r\n              params.wins(1)=params.wins(1)+1;\r\n              break;\r\n          end\r\n          params.board(pos1)=1;\r\n          params.board(pos2)=2;\r\n          if doDraw\r\n              image(4+params.board);\r\n              axis equal off;\r\n              colormap([1,1,1;.5,0,0;0,0,.5;0,0,0;0,0,1;1,0,0]);\r\n              set(gcf,'color','k');\r\n              drawnow;\r\n          end\r\n      end\r\n      if doDraw, pause; end\r\n      \r\n   end % game\r\n  end % nboards\r\n    \r\n  disp(sprintf('%d wins; %d ties; %d losses',params.wins));\r\n\r\n% Make the size equal to 100-W-T/4  Perfect=0, 100 L scores 200\r\nscr=100-params.wins(1)-params.wins(2)/4;\r\n\r\n\r\n% W-T/4 \u003e Losses to Pass\r\nassert(params.wins(1)-params.wins(2)/4\u003eparams.wins(3),sprintf('%d wins; %d ties; %d losses',params.wins));\r\n%%\r\n% Implement tron.m resizing to scr when assert W-T/4\u003eL  Fails\r\nglobal scr\r\n\r\nfeval(@assignin,'caller','score',floor(2*scr));\r\n\r\n%fh=fopen('tron.m','wt');\r\n%fprintf(fh,'%s\\n',repmat('1;',[1,floor(scr)]) );\r\n%fclose(fh);","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":"2012-11-24T15:58:19.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-06-18T00:51:07.000Z","updated_at":"2012-11-24T15:58:19.000Z","published_at":"2012-06-18T03:16:51.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTRON Tournament is based upon the excellent TRON Challenge,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCody 327\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, created by Alfonso Nieto-Castanon.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost Bot: Fixed Pattern CCW - Weak\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Passing criteria is changed to Wins - Ties/4 \u0026gt; Losses.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe 100 Matches will be \\\"even\\\" as Host and Player will play the same 50 paired starting positions.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe TRON arena is fixed at 50x50.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlease visit the Cody 327 link for any info I may miss.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBoard: 50x50\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWall: -3 (Rows 1 and 50, Columns 1 and 50)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer: 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost: 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer created wall: -1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost created wall: -2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEmpty Spaces: 0\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayers start on either row 2 or column 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayers move simultaneously and thus a crash to the same spot is a tie.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRunning into a wall first is a loss.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSimultaneous wall crashing is a tie.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven the board with its coverage make a Move, \\\"NESW\\\".\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\"N\\\" idx-1; \\\"E\\\" idx+50, \\\"S\\\" idx+1, and \\\"W\\\" is idx-50.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Board\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (string 1 character) eg \\\"N\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eScore:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Perfect Score is 0 points (200-Wins*2-Ties/2), 100 L scores 200\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Test Suite has some very nice methods to implement checks.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBot 010 is Rick's CCW Fixed Pattern Bot - Weak\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":821,"title":"Pentago: find winning move","description":"\u003chttp://en.wikipedia.org/wiki/Pentago Pentago\u003e is a challenging two-player strategy game. The objective is to be the first player to connect five marbles in a row (horizontally, vertically, or diagonally) on the board. The 6x6 board consists of four 3x3 game blocks, each of which can be twisted in 90-degree intervals (CW/CCW).  During a turn, a player places a marble anywhere on the board and _then_ rotates one of the game blocks 90 degrees in either direction. The marble does not have to be played on the same block that is rotated.\r\n\r\nFor this problem, you are given a 6x6 matrix representing the current board setup, where 0s, 1s, and 2s correspond to empty spaces, Player 1 marbles, and Player 2 marbles, respectively. You are Player 1 and it is your turn. If there is a winning move, return the row and column subscripts of the winning play as well as the required rotation (see below for details). If you can win without rotating a game block, return [] for the second output. If there is no winning move on this turn, both outputs should be []. You may assume that there will be only one winning move, if any.\r\n\r\n*Input:*\r\n\r\n* _board_ - 6x6 matrix of filled with 0-2\r\n\r\n*Output:*\r\n\r\n* _pos_ - 1x2 vector with row and column of winning move (if any).\r\n* _rot_ - 2x2 matrix describing rotation required to win (if any). A CW rotation is indicated by a 1, while a CCW rotation is indicated by a -1. For example,\r\n\r\n  rot = [-1 0\r\n          0 0]   \r\n\r\nmeans the top-left game block was rotated 90 degrees in the counterclockwise direction.\r\n\r\n  rot = [0 0\r\n         0 1]\r\n\r\nmeans the bottom-right game block was rotated 90 degrees in the clockwise direction.\r\n\r\n*Example*\r\n\r\n  board = 0 0 0 0 2 0\r\n          1 1 1 2 1 0\r\n          0 0 0 0 0 0\r\n          0 2 0 2 0 0\r\n          0 1 0 0 0 0\r\n          0 0 0 0 0 0\r\n\r\nshould return\r\n\r\n  pos = [3 5]\r\n  rot = [0 1\r\n         0 0]\r\n\r\nbecause placing a marble at (3,5) yields\r\n\r\n  0 0 0 0 2 0\r\n  1 1 1 2 1 0\r\n  0 0 0 0 1 0\r\n  0 2 0 2 0 0\r\n  0 1 0 0 0 0\r\n  0 0 0 0 0 0\r\n\r\nand then rotating the top-right block CW yields\r\n\r\n\r\n  0 0 0 0 2 0\r\n  1 1 1 1 1 2\r\n  0 0 0 0 0 0\r\n  0 2 0 2 0 0\r\n  0 1 0 0 0 0\r\n  0 0 0 0 0 0\r\n\r\nwhich gives Player 1 the win with 5 in a row (see 2nd row).","description_html":"\u003cp\u003e\u003ca href=\"http://en.wikipedia.org/wiki/Pentago\"\u003ePentago\u003c/a\u003e is a challenging two-player strategy game. The objective is to be the first player to connect five marbles in a row (horizontally, vertically, or diagonally) on the board. The 6x6 board consists of four 3x3 game blocks, each of which can be twisted in 90-degree intervals (CW/CCW).  During a turn, a player places a marble anywhere on the board and \u003ci\u003ethen\u003c/i\u003e rotates one of the game blocks 90 degrees in either direction. The marble does not have to be played on the same block that is rotated.\u003c/p\u003e\u003cp\u003eFor this problem, you are given a 6x6 matrix representing the current board setup, where 0s, 1s, and 2s correspond to empty spaces, Player 1 marbles, and Player 2 marbles, respectively. You are Player 1 and it is your turn. If there is a winning move, return the row and column subscripts of the winning play as well as the required rotation (see below for details). If you can win without rotating a game block, return [] for the second output. If there is no winning move on this turn, both outputs should be []. You may assume that there will be only one winning move, if any.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e\u003c/p\u003e\u003cul\u003e\u003cli\u003e\u003ci\u003eboard\u003c/i\u003e - 6x6 matrix of filled with 0-2\u003c/li\u003e\u003c/ul\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e\u003c/p\u003e\u003cul\u003e\u003cli\u003e\u003ci\u003epos\u003c/i\u003e - 1x2 vector with row and column of winning move (if any).\u003c/li\u003e\u003cli\u003e\u003ci\u003erot\u003c/i\u003e - 2x2 matrix describing rotation required to win (if any). A CW rotation is indicated by a 1, while a CCW rotation is indicated by a -1. For example,\u003c/li\u003e\u003c/ul\u003e\u003cpre class=\"language-matlab\"\u003erot = [-1 0\r\n        0 0]   \r\n\u003c/pre\u003e\u003cp\u003emeans the top-left game block was rotated 90 degrees in the counterclockwise direction.\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003erot = [0 0\r\n       0 1]\r\n\u003c/pre\u003e\u003cp\u003emeans the bottom-right game block was rotated 90 degrees in the clockwise direction.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eboard = 0 0 0 0 2 0\r\n        1 1 1 2 1 0\r\n        0 0 0 0 0 0\r\n        0 2 0 2 0 0\r\n        0 1 0 0 0 0\r\n        0 0 0 0 0 0\r\n\u003c/pre\u003e\u003cp\u003eshould return\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003epos = [3 5]\r\nrot = [0 1\r\n       0 0]\r\n\u003c/pre\u003e\u003cp\u003ebecause placing a marble at (3,5) yields\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e0 0 0 0 2 0\r\n1 1 1 2 1 0\r\n0 0 0 0 1 0\r\n0 2 0 2 0 0\r\n0 1 0 0 0 0\r\n0 0 0 0 0 0\r\n\u003c/pre\u003e\u003cp\u003eand then rotating the top-right block CW yields\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e0 0 0 0 2 0\r\n1 1 1 1 1 2\r\n0 0 0 0 0 0\r\n0 2 0 2 0 0\r\n0 1 0 0 0 0\r\n0 0 0 0 0 0\r\n\u003c/pre\u003e\u003cp\u003ewhich gives Player 1 the win with 5 in a row (see 2nd row).\u003c/p\u003e","function_template":"function [pos rot] = pentago_win(board)\r\n  pos = [];\r\n  rot = [];\r\nend","test_suite":"%%\r\nboard =[0 0 0 0 2 1\r\n        1 2 2 2 1 0\r\n        0 0 0 1 0 0\r\n        0 2 1 2 0 0\r\n        0 0 0 0 0 0\r\n        0 0 0 0 0 0];\r\npos_correct = [5 2];\r\nrot_correct = [];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))\r\n\r\n%%\r\nboard =[0 0 0 0 1 0\r\n        1 2 2 2 1 0\r\n        0 0 0 1 1 0\r\n        0 2 2 2 0 0\r\n        0 2 0 1 0 0\r\n        0 0 0 0 0 0];\r\npos_correct = [5 5];\r\nrot_correct = [0 0;0 1];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))\r\n\r\n%%\r\nboard =[0 0 1 1 1 2\r\n        2 2 0 2 2 0\r\n        0 0 1 0 1 0\r\n        0 2 0 2 0 0\r\n        0 0 0 1 0 0\r\n        0 0 0 0 0 0];\r\npos_correct = [2 3];\r\nrot_correct = [-1 0;0 0];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))\r\n\r\n%%\r\nboard =[1 0 2 1 1 2\r\n        2 0 0 2 2 0\r\n        0 0 1 0 1 0\r\n        1 2 0 2 0 0\r\n        0 1 2 1 0 0\r\n        0 0 1 2 0 0];\r\npos_correct = [];\r\nrot_correct = [];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))\r\n\r\n%%\r\nboard =[1 0 2 1 2 0\r\n        2 0 0 2 1 0\r\n        0 0 1 1 2 0\r\n        2 2 0 2 0 0\r\n        0 1 2 1 0 0\r\n        0 0 1 2 0 1];\r\npos_correct = [1 6];\r\nrot_correct = [0 0;-1 0];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":4793,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":35,"test_suite_updated_at":"2012-07-09T21:39:10.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-07-09T20:36:50.000Z","updated_at":"2026-02-15T07:32:20.000Z","published_at":"2012-07-09T21:39:10.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://en.wikipedia.org/wiki/Pentago\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePentago\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is a challenging two-player strategy game. The objective is to be the first player to connect five marbles in a row (horizontally, vertically, or diagonally) on the board. The 6x6 board consists of four 3x3 game blocks, each of which can be twisted in 90-degree intervals (CW/CCW). During a turn, a player places a marble anywhere on the board and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethen\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e rotates one of the game blocks 90 degrees in either direction. The marble does not have to be played on the same block that is rotated.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor this problem, you are given a 6x6 matrix representing the current board setup, where 0s, 1s, and 2s correspond to empty spaces, Player 1 marbles, and Player 2 marbles, respectively. You are Player 1 and it is your turn. If there is a winning move, return the row and column subscripts of the winning play as well as the required rotation (see below for details). If you can win without rotating a game block, return [] for the second output. If there is no winning move on this turn, both outputs should be []. You may assume that there will be only one winning move, if any.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eboard\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e - 6x6 matrix of filled with 0-2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003epos\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e - 1x2 vector with row and column of winning move (if any).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003erot\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e - 2x2 matrix describing rotation required to win (if any). A CW rotation is indicated by a 1, while a CCW rotation is indicated by a -1. For example,\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[rot = [-1 0\\n        0 0]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003emeans the top-left game block was rotated 90 degrees in the counterclockwise direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[rot = [0 0\\n       0 1]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003emeans the bottom-right game block was rotated 90 degrees in the clockwise direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[board = 0 0 0 0 2 0\\n        1 1 1 2 1 0\\n        0 0 0 0 0 0\\n        0 2 0 2 0 0\\n        0 1 0 0 0 0\\n        0 0 0 0 0 0]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eshould return\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[pos = [3 5]\\nrot = [0 1\\n       0 0]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ebecause placing a marble at (3,5) yields\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[0 0 0 0 2 0\\n1 1 1 2 1 0\\n0 0 0 0 1 0\\n0 2 0 2 0 0\\n0 1 0 0 0 0\\n0 0 0 0 0 0]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eand then rotating the top-right block CW yields\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[0 0 0 0 2 0\\n1 1 1 1 1 2\\n0 0 0 0 0 0\\n0 2 0 2 0 0\\n0 1 0 0 0 0\\n0 0 0 0 0 0]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ewhich gives Player 1 the win with 5 in a row (see 2nd row).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2291,"title":"GJam 2014 Qualifier: Deceitful War (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2974486/dashboard#s=p3 GJam 2014 Qualifier Deceitful War\u003e.\r\n\r\nMy condensed summary of the problem statement.\r\n\r\nGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\r\n\r\nUnsurprisingly when A truthfully states masses player B consistently wins.\r\n\r\nPlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\r\n\r\nPart one is determine the best possible score for A when playing deceitfully.\r\n\r\nPart two is determine the best possible score if player A did not look and is honest.\r\n\r\n*Examples:*\r\n\r\n  A: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\r\n  \r\n  A 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\n  B 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\n  Deceitful A Wins 8\r\n  Optimal Honest A Wins 4\r\n\r\n*Input:* A,B vectors of length N (Small has N\u003c=10, Large(future challenge N\u003c=1000)\r\n\r\n*Output:* Deceitful Wins, Optimal Honest Wins\r\n\r\n\r\n\r\n\r\n\r\n*Note:*\r\n\r\nIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error. \u003chttp://www.go-hero.net/jam/14/solutions/0/4/MATLAB GJam Deceitful Solutions\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2974486/dashboard#s=p3\"\u003eGJam 2014 Qualifier Deceitful War\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eMy condensed summary of the problem statement.\u003c/p\u003e\u003cp\u003eGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\u003c/p\u003e\u003cp\u003eUnsurprisingly when A truthfully states masses player B consistently wins.\u003c/p\u003e\u003cp\u003ePlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\u003c/p\u003e\u003cp\u003ePart one is determine the best possible score for A when playing deceitfully.\u003c/p\u003e\u003cp\u003ePart two is determine the best possible score if player A did not look and is honest.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eA: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eA 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\nB 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\nDeceitful A Wins 8\r\nOptimal Honest A Wins 4\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e A,B vectors of length N (Small has N\u0026lt;=10, Large(future challenge N\u0026lt;=1000)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Deceitful Wins, Optimal Honest Wins\u003c/p\u003e\u003cp\u003e\u003cb\u003eNote:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error. \u003ca href = \"http://www.go-hero.net/jam/14/solutions/0/4/MATLAB\"\u003eGJam Deceitful Solutions\u003c/a\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.\u003c/p\u003e","function_template":"function W = War(m)\r\n% W=[Deceitful Wins, Optimal Honest Wins]\r\n  W=[0 0];\r\nend","test_suite":"%%\r\nm=[0.270000 0.550000 0.910000 0.330000 0.520000 0.300000 ;0.850000 0.450000 0.060000 0.240000 0.120000 0.880000 ];\r\nWexp=[5 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.164000 0.255000 0.009000 0.445000 0.209000 0.100000 0.391000 0.536000 0.027000 0.118000 ;0.673000 0.782000 0.582000 0.882000 0.591000 0.855000 0.745000 0.955000 0.991000 0.600000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.800000 0.480000 0.760000 0.680000 0.160000 0.640000 0.360000 ;0.200000 0.440000 0.960000 0.280000 0.880000 0.520000 0.120000 ];\r\nWexp=[5 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.170000 0.100000 0.120000 0.200000 0.540000 0.150000 ;0.490000 0.070000 0.240000 0.680000 0.610000 0.340000 ];\r\nWexp=[2 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.780000 0.770000 0.900000 0.810000 0.880000 0.840000 0.600000 0.730000 0.930000 0.990000 ;0.270000 0.150000 0.260000 0.510000 0.570000 0.310000 0.170000 0.140000 0.400000 0.040000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.320000 0.820000 0.350000 0.770000 0.020000 0.550000 0.040000 0.990000 0.610000 0.190000 ;0.730000 0.530000 0.750000 0.800000 0.670000 0.870000 0.330000 0.250000 0.080000 0.680000 ];\r\nWexp=[7 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.510000 0.100000 0.380000 0.050000 0.210000 0.130000 0.440000 0.180000 ;0.560000 0.920000 0.540000 0.900000 0.670000 0.790000 0.820000 0.970000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.420000 ;0.080000 ];\r\nWexp=[1 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.690000 0.310000 0.540000 0.230000 0.710000 0.030000 0.490000 0.600000 0.510000 0.860000 ;0.830000 0.340000 0.370000 0.740000 0.430000 0.200000 0.090000 0.170000 0.910000 0.400000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.300000 0.920000 0.710000 0.130000 0.230000 0.620000 0.140000 0.260000 0.360000 0.310000 ;0.440000 0.010000 0.640000 0.350000 0.820000 0.550000 0.780000 0.790000 0.060000 0.570000 ];\r\nWexp=[6 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.504000 0.218000 0.479000 0.101000 0.050000 0.445000 0.471000 0.084000 0.034000 0.008000 ;0.992000 0.546000 0.647000 0.849000 0.891000 0.739000 0.765000 0.555000 0.613000 0.748000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.570000 0.470000 0.640000 0.550000 0.060000 0.430000 0.040000 0.280000 0.130000 0.510000 ;0.700000 0.740000 0.770000 0.810000 0.870000 0.790000 0.940000 0.910000 0.850000 0.660000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.200000 0.020000 0.510000 0.120000 0.220000 0.250000 0.100000 0.490000 0.530000 0.350000 ;0.800000 0.960000 0.760000 0.820000 0.710000 0.570000 0.940000 0.690000 0.900000 0.550000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.260000 0.030000 0.360000 0.410000 0.330000 0.430000 0.540000 0.300000 0.280000 0.100000 ;0.770000 0.910000 0.700000 0.550000 0.590000 0.780000 0.650000 0.860000 0.750000 0.990000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.920000 0.370000 0.900000 0.200000 0.150000 0.020000 0.530000 0.860000 0.250000 0.190000 ;0.170000 0.980000 0.140000 0.680000 0.830000 0.470000 0.950000 0.340000 0.880000 0.540000 ];\r\nWexp=[7 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.510000 0.020000 0.490000 0.280000 0.080000 0.830000 0.170000 0.140000 0.850000 ;0.420000 0.650000 0.950000 0.890000 0.030000 0.580000 0.380000 0.060000 0.370000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.670000 0.050000 0.590000 0.330000 0.820000 0.030000 0.740000 0.560000 0.950000 0.620000 ;0.210000 0.380000 0.770000 0.080000 0.260000 0.640000 0.460000 0.790000 0.310000 0.410000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.840000 0.800000 0.420000 0.580000 0.670000 0.070000 0.360000 ;0.690000 0.870000 0.310000 0.600000 0.760000 0.200000 0.380000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.450000 0.380000 0.280000 0.590000 0.620000 0.230000 0.810000 ;0.320000 0.190000 0.680000 0.140000 0.090000 0.940000 0.170000 ];\r\nWexp=[6 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.207000 0.288000 0.180000 0.595000 0.748000 0.459000 0.802000 0.387000 0.027000 0.090000 ;0.450000 0.982000 0.694000 0.613000 0.486000 0.423000 0.685000 0.847000 0.432000 0.604000 ];\r\nWexp=[4 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.750000 0.970000 0.820000 0.840000 0.680000 0.780000 0.730000 0.270000 0.220000 0.150000 ;0.130000 0.920000 0.390000 0.320000 0.230000 0.080000 0.800000 0.330000 0.720000 0.590000 ];\r\nWexp=[10 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.260000 0.140000 0.600000 0.950000 0.160000 0.650000 0.580000 0.910000 0.230000 0.020000 ;0.120000 0.510000 0.530000 0.280000 0.350000 0.070000 0.400000 0.930000 0.490000 0.090000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.545000 0.527000 0.500000 0.727000 0.018000 0.400000 0.191000 0.982000 0.409000 0.591000 ;0.945000 0.745000 0.355000 0.673000 0.045000 0.118000 0.682000 0.827000 0.645000 0.482000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.930000 0.980000 0.470000 0.810000 0.830000 0.460000 0.510000 0.540000 ;0.490000 0.640000 0.170000 0.290000 0.140000 0.440000 0.590000 0.760000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.580000 ;0.330000 ];\r\nWexp=[1 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.640000 0.820000 0.700000 0.480000 0.520000 0.610000 0.060000 0.240000 0.300000 ;0.550000 0.450000 0.090000 0.030000 0.850000 0.670000 0.760000 0.360000 0.790000 ];\r\nWexp=[7 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.800000 ;0.900000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.340000 0.100000 0.040000 0.110000 0.650000 0.250000 0.570000 0.480000 0.150000 0.800000 ;0.550000 0.020000 0.920000 0.080000 0.700000 0.360000 0.910000 0.710000 0.820000 0.850000 ];\r\nWexp=[5 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.340000 0.890000 0.060000 0.090000 0.750000 0.730000 0.810000 0.950000 0.660000 0.390000 ;0.530000 0.970000 0.610000 0.670000 0.690000 0.380000 0.590000 0.300000 0.720000 0.110000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.870000 0.600000 0.860000 0.830000 0.680000 0.810000 0.700000 0.920000 0.760000 ;0.170000 0.510000 0.330000 0.050000 0.240000 0.030000 0.410000 0.480000 0.520000 ];\r\nWexp=[9 9];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.940000 0.720000 0.810000 0.220000 0.280000 0.530000 0.440000 0.160000 0.880000 0.970000 ;0.120000 0.030000 0.470000 0.560000 0.380000 0.340000 0.690000 0.090000 0.250000 0.750000 ];\r\nWexp=[10 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.410000 0.360000 0.230000 0.140000 0.180000 0.050000 0.500000 0.270000 0.090000 0.450000 ;0.680000 0.950000 0.910000 0.860000 0.730000 0.550000 0.590000 0.820000 0.640000 0.770000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.278000 0.852000 0.370000 0.824000 0.389000 0.704000 0.546000 0.204000 0.296000 0.056000 ;0.833000 0.315000 0.991000 0.028000 0.907000 0.630000 0.361000 0.037000 0.065000 0.954000 ];\r\nWexp=[7 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.713000 0.657000 0.778000 0.435000 0.565000 0.870000 0.963000 0.343000 0.481000 0.593000 ;0.287000 0.333000 0.454000 0.130000 0.370000 0.759000 0.176000 0.611000 0.231000 0.398000 ];\r\nWexp=[10 6];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.590000 0.750000 0.650000 0.900000 0.740000 0.880000 0.850000 ;0.400000 0.070000 0.540000 0.380000 0.570000 0.150000 0.490000 ];\r\nWexp=[7 7];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.110000 0.920000 0.540000 0.840000 0.380000 0.770000 0.900000 0.490000 0.870000 0.750000 ;0.620000 0.480000 0.330000 0.440000 0.890000 0.130000 0.430000 0.080000 0.340000 0.560000 ];\r\nWexp=[10 5];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.480000 0.650000 0.770000 0.690000 0.720000 0.560000 0.660000 0.550000 0.510000 0.730000 ;0.310000 0.440000 0.300000 0.060000 0.200000 0.420000 0.030000 0.070000 0.110000 0.140000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.900000 0.680000 0.600000 0.800000 ;0.350000 0.050000 0.170000 0.880000 ];\r\nWexp=[4 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.730000 0.910000 0.450000 0.640000 0.090000 ;0.550000 0.360000 0.270000 0.820000 0.180000 ];\r\nWexp=[4 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.530000 0.740000 0.410000 0.320000 0.820000 0.970000 0.620000 0.500000 0.710000 0.090000 ;0.180000 0.760000 0.380000 0.150000 0.470000 0.210000 0.560000 0.120000 0.590000 0.440000 ];\r\nWexp=[9 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.487000 0.092000 0.714000 0.160000 0.504000 0.277000 0.479000 0.605000 0.462000 0.832000 ;0.210000 0.824000 0.118000 0.387000 0.664000 0.874000 0.445000 0.739000 0.546000 0.017000 ];\r\nWexp=[8 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.100000 ;0.400000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.688000 0.872000 0.615000 0.477000 0.734000 0.624000 0.394000 0.532000 0.954000 0.817000 ;0.193000 0.119000 0.349000 0.073000 0.037000 0.009000 0.128000 0.303000 0.046000 0.064000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.910000 0.550000 0.300000 0.570000 0.920000 0.400000 0.450000 0.150000 0.110000 0.190000 ;0.090000 0.790000 0.890000 0.740000 0.850000 0.940000 0.340000 0.380000 0.720000 0.260000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.723000 0.639000 0.824000 0.697000 0.840000 0.882000 0.437000 0.782000 0.588000 0.218000 ;0.345000 0.151000 0.067000 0.849000 0.815000 0.235000 0.521000 0.765000 0.950000 0.681000 ];\r\nWexp=[9 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.200000 0.150000 0.350000 0.090000 0.110000 0.330000 0.220000 ;0.390000 0.460000 0.850000 0.700000 0.570000 0.610000 0.500000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.850000 0.790000 0.550000 0.380000 0.300000 0.400000 0.770000 0.740000 0.320000 0.570000 ;0.260000 0.210000 0.110000 0.130000 0.020000 0.040000 0.230000 0.190000 0.090000 0.060000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.961000 0.330000 0.010000 0.816000 0.583000 0.913000 0.893000 0.951000 0.126000 0.398000 ;0.767000 0.029000 0.262000 0.641000 0.175000 0.544000 0.359000 0.932000 0.680000 0.476000 ];\r\nWexp=[9 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.300000 ;0.700000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.240000 0.050000 0.190000 0.110000 0.920000 0.590000 0.730000 0.380000 0.780000 0.950000 ;0.860000 0.700000 0.430000 0.620000 0.220000 0.540000 0.410000 0.890000 0.680000 0.490000 ];\r\nWexp=[6 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\n% function GJam_Qual_2014d\r\n% % \r\n% %War\r\n% fn='D-small-attempt0.in';\r\n% %fn='D-large.in';\r\n% [data] = read_file(fn); % \r\n% \r\n% fidG = fopen('D-small-output.out', 'w');\r\n% %fidG = fopen('D-large-output001.out', 'w');\r\n% tic\r\n% \r\n% for i=1:size(data,2) % Cell array has N rows of cases\r\n% % m=sort(data{i},2);\r\n%  m=data{i};\r\n%  dw = dWar(m) ;% \r\n%  w = War(m) ;%  \r\n%  \r\n%    fprintf('Case #%i: %i %i\\n',i,dw,w);\r\n%    fprintf(fidG,'Case #%i: %i %i\\n',i,dw,w);\r\n%     \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% \r\n% end\r\n% \r\n% function dw=dWar(m)\r\n% % Post contest\r\n% % Lie to burn opponent best pieces\r\n%  N=sort(m(1,:));\r\n%  K=sort(m(2,:));\r\n%  \r\n%  dw=0;\r\n%  for i=1:length(N)\r\n%   if N(i)\u003eK(1) % Lie to above to beat lowest\r\n%    dw=dw+1;\r\n%    K=K(2:end);\r\n%   else % Lie to just below best\r\n%    K=K(1:end-1);\r\n%   end\r\n%  end\r\n%  \r\n% end\r\n% \r\n% function w=War(m)\r\n% % Optimal truthful strategy\r\n% % Best lucky sequence\r\n%  w=0;\r\n% \r\n%  Nm=sort(m(1,:));\r\n%  Km=sort(m(2,:));\r\n%  \r\n%  Nmz=[Nm' ones(size(Nm,2),1)];\r\n%  Kmz=[Km' zeros(size(Km,2),1)];\r\n%  z=[Nmz;Kmz]; \r\n%  z=sortrows(z,-1);\r\n%  \r\n%  while ~isempty(z)\r\n%   ptr1=find(z(:,2)==1,1,'last');\r\n%   ptr0=find(z(1:ptr1,2)==0,1,'last');\r\n%   if isempty(ptr0)\r\n%    % score\r\n%    w=w+1;\r\n%    z(ptr1,:)=[];\r\n%    ptr0=find(z(:,2)==0,1,'last');\r\n%    z(ptr0,:)=[];  \r\n%   else\r\n%    z(ptr1,:)=[];\r\n%    z(ptr0,:)=[];  \r\n%   end\r\n%  end \r\n%  % Create worst Ken/B Scenario\r\n%  \r\n% end\r\n% \r\n% \r\n% function [d] = read_file(fn)\r\n% % Read whole array then parse\r\n% % dlmread valid for numeric arrays\r\n%  m=dlmread(fn);\r\n%  m(1,:)=[];\r\n%  for i=1:size(m,1)/3\r\n%   d{i}=m(3*i-1:3*i,1:m(3*i-2,1));\r\n%  end\r\n%  \r\n% end % read_file\r\n% Data Set file\r\n%4\r\n%1\r\n%0.5\r\n%0.6\r\n%2\r\n%0.7 0.2\r\n%0.8 0.3\r\n%3\r\n%0.5 0.1 0.9\r\n%0.6 0.4 0.3\r\n%9\r\n%0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\n%0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\n\r\n\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-04-19T14:08:56.000Z","updated_at":"2014-04-19T15:00:47.000Z","published_at":"2014-04-19T15:00:47.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis Challenge is derived from\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contest/2974486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 Qualifier Deceitful War\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eMy condensed summary of the problem statement.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eUnsurprisingly when A truthfully states masses player B consistently wins.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePart one is determine the best possible score for A when playing deceitfully.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePart two is determine the best possible score if player A did not look and is honest.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExamples:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[A: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\\n\\nA 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\\nB 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\\nDeceitful A Wins 8\\nOptimal Honest A Wins 4]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e A,B vectors of length N (Small has N\u0026lt;=10, Large(future challenge N\u0026lt;=1000)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Deceitful Wins, Optimal Honest Wins\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.go-hero.net/jam/14/solutions/0/4/MATLAB\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Deceitful Solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44718,"title":"Optimize the Tollbooths","description":"Your company has recently built its own highway from which they hope to generate some revenue. The highway has no branches or intersections, it is a simple line segment. Your company also has access to simple data from some potential customers that describe their start and endpoint locations and their budget.\r\n\r\nTollbooths are also located on various locations on the highway. The total toll a customer pays is the sum of all tolls on the tollbooths that lie between their start and end locations. If a customer cannot afford the total toll they must pay, then they simply don't make the trip and end up paying nothing.\r\n\r\nThe customer wants to start or end their destination at the precise location of a tollbooth, so we can represent the problem as follows. We have a graph that is a simple path with N nodes. Each node represents a potential start or end location of a customer and there is a single tollbooth located on each node. So the total toll a customer pays is the sum of the tolls on the nodes they cross to reach their endpoint. Both the start point and end point are also toll booths.\r\n\r\nYour task is to set the tolls on each of the tollbooths to generate the *maximum revenue* for your company. The answer is the pricing of each toll booth.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; transform-origin: 332px 171px; vertical-align: baseline; perspective-origin: 332px 171px; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; transform-origin: 309px 42px; white-space: pre-wrap; perspective-origin: 309px 42px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eYour company has recently built its own highway from which they hope to generate some revenue. The highway has no branches or intersections, it is a simple line segment. Your company also has access to simple data from some potential customers that describe their start and endpoint locations and their budget.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; transform-origin: 309px 42px; white-space: pre-wrap; perspective-origin: 309px 42px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eTollbooths are also located on various locations on the highway. The total toll a customer pays is the sum of all tolls on the tollbooths that lie between their start and end locations. If a customer cannot afford the total toll they must pay, then they simply don't make the trip and end up paying nothing.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; transform-origin: 309px 52.5px; white-space: pre-wrap; perspective-origin: 309px 52.5px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe customer wants to start or end their destination at the precise location of a tollbooth, so we can represent the problem as follows. We have a graph that is a simple path with N nodes. Each node represents a potential start or end location of a customer and there is a single tollbooth located on each node. So the total toll a customer pays is the sum of the tolls on the nodes they cross to reach their endpoint. Both the start point and end point are also toll booths.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; transform-origin: 309px 21px; white-space: pre-wrap; perspective-origin: 309px 21px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eYour task is to set the tolls on each of the tollbooths to generate the\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003emaximum revenue\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e for your company. The answer is the pricing of each toll booth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = toll_pricing_strategy(option,budget)\r\n   y=zeros(1,size(option,2));\r\n  % Optimize much !\r\nend","test_suite":"%% \r\noption=[1 0; 0 1; 1 1];\r\nbudget=[10;10;10];\r\ny_correct=[10,10];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))\r\n\r\n%%\r\noption = [1 0 0; 0 1 0; 1 1 1];\r\nbudget=[10;10;15];\r\ny_correct=[10,5,0];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))\r\n\r\n%%\r\noption=[0 1 1 0;1 1 1 0;1 0 0 0; 0 0 1 1];\r\nbudget=[15 ;25 ;15; 20];\r\ny_correct=[10,0,15,5];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))\r\n\r\n%%\r\noption=[0   0   0   1   1   1\r\n   0   0   1   1   1   1\r\n   1   1   0   0   0   0\r\n   0   1   1   1   0   0\r\n   1   1   1   1   1   1\r\n   0   1   1   1   1   1];\r\nbudget=[ 42 ;31 ;12 ;63 ;105 ;87];\r\ny_correct=[18,12,20,31,11,13];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))\r\n\r\n%%\r\noption=[1   1   1   1   1   0   0   0\r\n   0   0   0   1   1   1   1  0\r\n   1   1   1   0   0   0   0   0\r\n   0   1   1   1   1   1   0   0\r\n   0   0   1   1   1   1   1   0\r\n   0   1   1   1   1   1   0   0\r\n   1   1   1   0   0   0   0   0\r\n   0   0   0   1   1   1   1   1];\r\nbudget=[25;50;60;120;40;80;20;60];\r\ny_correct=[30,10,20,5,15,30,10,0];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))","published":true,"deleted":false,"likes_count":0,"comments_count":6,"created_by":195572,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2,"test_suite_updated_at":"2020-10-03T13:41:47.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-08-04T21:46:46.000Z","updated_at":"2020-10-03T13:41:47.000Z","published_at":"2018-08-04T21:50:10.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour company has recently built its own highway from which they hope to generate some revenue. The highway has no branches or intersections, it is a simple line segment. Your company also has access to simple data from some potential customers that describe their start and endpoint locations and their budget.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTollbooths are also located on various locations on the highway. The total toll a customer pays is the sum of all tolls on the tollbooths that lie between their start and end locations. If a customer cannot afford the total toll they must pay, then they simply don't make the trip and end up paying nothing.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe customer wants to start or end their destination at the precise location of a tollbooth, so we can represent the problem as follows. We have a graph that is a simple path with N nodes. Each node represents a potential start or end location of a customer and there is a single tollbooth located on each node. So the total toll a customer pays is the sum of the tolls on the nodes they cross to reach their endpoint. Both the start point and end point are also toll booths.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour task is to set the tolls on each of the tollbooths to generate the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003emaximum revenue\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e for your company. The answer is the pricing of each toll booth.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":1246,"title":"PACMAT 05 - Optimized Ghosts, PACMAT increasing speed, 12 Lives","description":"The Classic PACMAN game brought to Cody.\r\n\r\nPACMAT requires clearing the Yellow Dots while avoiding the wandering ghosts in 12 lives. Adjacent Ghosts will capture PACMAT.  Ghosts do not use the tunnel. On Ghost capture everyone gets reset. These trained ghosts take the minimum path to PACMAT assuming the other Ghosts are walls.  PACMAT gets faster as a function of captures. \r\n\r\n\u003c\u003chttps://sites.google.com/site/razapor/matlab_cody/PACMAT_300.jpg\u003e\u003e\r\n\r\nTo aid in development of your routine, a PACMAT_Ghosts_005.m file that creates a video has been posted at \u003chttps://sites.google.com/site/razapor/matlab_cody/PACMAT_Ghosts_005.m PACMAT_Ghosts_005.m\u003e. (Right click, 'save link as'). Using patches thus enable/figure,  disable/video for best results.\r\n\r\n\r\n\u003chttps://sites.google.com/site/razapor/matlab_cody/PACMAT_G005_video_ANC4_dbltunnel.mp4 Alfonso Enhanced\u003e (MP4) Alfonso clears at 2X speed with multiple tunnel usages.\r\n\r\n\r\n*Inputs:* Map   Definitions: -1=Wall, 0=Empty, 1=Dot, 2=PACMAT, \u003e2=Ghost\r\n\r\n*Output:* Direction  Definitions: 1-Up, 2-Right, 3-Down, 4-Left, 0-No move\r\n\r\n*Pass Criteria:* Clear all dots\r\n\r\n*Scoring:* \r\n\r\n  score = F(Lives Remaining) + moves\r\n\r\n  F = [ 9000 8000 7500 7000 6500 4000 3000 2000 1000 500 100 0]  \r\n\r\n*Note:* Speed as function of Lives remaining [12 8 6 4 3 2 2 2 2 2 2 1];\r\n\r\n\r\n*Future:* Asteroids\r\n","description_html":"\u003cp\u003eThe Classic PACMAN game brought to Cody.\u003c/p\u003e\u003cp\u003ePACMAT requires clearing the Yellow Dots while avoiding the wandering ghosts in 12 lives. Adjacent Ghosts will capture PACMAT.  Ghosts do not use the tunnel. On Ghost capture everyone gets reset. These trained ghosts take the minimum path to PACMAT assuming the other Ghosts are walls.  PACMAT gets faster as a function of captures.\u003c/p\u003e\u003cimg src=\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_300.jpg\"\u003e\u003cp\u003eTo aid in development of your routine, a PACMAT_Ghosts_005.m file that creates a video has been posted at \u003ca href=\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_Ghosts_005.m\"\u003ePACMAT_Ghosts_005.m\u003c/a\u003e. (Right click, 'save link as'). Using patches thus enable/figure,  disable/video for best results.\u003c/p\u003e\u003cp\u003e\u003ca href=\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_G005_video_ANC4_dbltunnel.mp4\"\u003eAlfonso Enhanced\u003c/a\u003e (MP4) Alfonso clears at 2X speed with multiple tunnel usages.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInputs:\u003c/b\u003e Map   Definitions: -1=Wall, 0=Empty, 1=Dot, 2=PACMAT, \u003e2=Ghost\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Direction  Definitions: 1-Up, 2-Right, 3-Down, 4-Left, 0-No move\u003c/p\u003e\u003cp\u003e\u003cb\u003ePass Criteria:\u003c/b\u003e Clear all dots\u003c/p\u003e\u003cp\u003e\u003cb\u003eScoring:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003escore = F(Lives Remaining) + moves\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eF = [ 9000 8000 7500 7000 6500 4000 3000 2000 1000 500 100 0]  \r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eNote:\u003c/b\u003e Speed as function of Lives remaining [12 8 6 4 3 2 2 2 2 2 2 1];\u003c/p\u003e\u003cp\u003e\u003cb\u003eFuture:\u003c/b\u003e Asteroids\u003c/p\u003e","function_template":"function  [newdir]=pacmat(map)\r\n% raz 314\r\n persistent ptr\r\n if isempty(ptr)\r\n  ptr=['bbbbbbbcccbbbbbcccdddddddddddddddddddddddddaaa'...\r\n      'bbbbbaaaaaaaaaaaaaaaaaaaaaaaaadddddcccccccbbbbddddaaabbbbbbbb'...\r\n     'cccbbbdddaaabbbaaaadddddbbbbbccccbbbbbbbbbbbbbbaaaaddddddddddd'...        'ccccbbbcccdddbbbaaabbbaaaccccccbbbbbaaccdddddccccccccccccccaabbbbbcccddccc'...\r\n'dddaaaaaaddddddcccbbbcccdddcccdddaaadddaaaddbbbbbaaadddddddddddcccbbccc'];\r\n  ptr=(ptr-'a')+1;\r\n end\r\n  \r\n newdir=ptr(1);\r\n ptr(1)=[];\r\nend","test_suite":"%%\r\nfeval(@assignin,'caller','score',10000);\r\n%%\r\nmax_moves=4000; % Expect \u003c 1000\r\n\r\nmap=[...\r\n      repmat('a',1,28);\r\n      'accccccccccccaacccccccccccca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acccccccccccccccccccccccccca';\r\n      'acaaaacaacaaaaaaaacaacaaaaca';\r\n      'acaaaacaacaaaaaaaacaacaaaaca';\r\n      'accccccaaccccaaccccaacccccca';\r\n      'aaaaaacaaaaabaabaaaaacaaaaaa';\r\n      'aaaaaacaaaaabaabaaaaacaaaaaa';\r\n      'aaaaaacaabbbbbbbbbbaacaaaaaa';\r\n      'aaaaaacaabaaabbaaabaacaaaaaa';\r\n      'aaaaaacaabalbbbblabaacaaaaaa';\r\n      'bbbbbbcbbbabbbbbbabbbcbbbbbb';\r\n      'aaaaaacaabalbbbblabaacaaaaaa';\r\n      'aaaaaacaabaaaaaaaabaacaaaaaa';\r\n      'aaaaaacaabbbbbbbbbbaacaaaaaa';\r\n      'aaaaaacaabaaaaaaaabaacaaaaaa';\r\n      'aaaaaacaabaaaaaaaabaacaaaaaa';\r\n      'accccccccccccaacccccccccccca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acaaaacaaaaacaacaaaaacaaaaca';\r\n      'acccaacccccccbdcccccccaaccca';\r\n      'aaacaacaacaaaaaaaacaacaacaaa';\r\n      'aaacaacaacaaaaaaaacaacaacaaa';\r\n      'accccccaaccccaaccccaacccccca';\r\n      'acaaaaaaaaaacaacaaaaaaaaaaca';\r\n      'acaaaaaaaaaacaacaaaaaaaaaaca';\r\n      'acccccccccccccccccccccccccca';\r\n      repmat('a',1,28);];\r\n  \r\n  map=map-'b';\r\n  [nr, nc]=size(map);\r\n\r\n  gmap=map; % Map used by ghosts to simplify PAC Capture\r\n  gmap(15,6)=Inf; %No tunnel ghosts\r\n  gmap(15,26)=Inf;\r\n  gmap(map==-1)=Inf; % walls to Inf\r\n  gmap(map\u003e2)=Inf; % Elim start points as viable moves, quicker box exit\r\n\r\n\r\n  mapdelta=[-1 nr 1 -nr]; % Valid as long as not on an edge\r\n  gmovxy=[0 -1;1 0;0 1;-1 0];\r\n\r\n  tunnel=find(map(:,1)==0); % tunnelptr\r\n  tunnel=[tunnel tunnel+nr*(nc-1)]; % Entrance/Exit Tunnel\r\n\r\n  [pmr, pmc]=find(map==2); % pi 24 row  pj 15 column of map\r\n   ptrpac=find(map==2);\r\n\r\n  ptrpac=find(map==2);\r\n  ptrpac_start=ptrpac;\r\n  ptrg_start=find(map\u003e2);\r\n  map(ptrg_start)=[10 20 30 40];\r\n  [gstartx, gstarty]=find(map\u003e2);\r\n  \r\n  lives=12; % Lives\r\n  speed=[12 8 6 4 3 2 2 2 2 2 2 1]; % Faster as fewer lives remain\r\n  movepac=0;\r\n\r\nwhile lives \u0026\u0026 any(mod(map(:),10)==1) \u0026\u0026 movepac\u003cmax_moves\r\n\r\n for pac2x=1:speed(lives) % G05 Mod\r\n  if ~(lives \u0026\u0026 any(mod(map(:),10)==1)),continue;end % Died or completed\r\n \r\n movepac=movepac+1;\r\n\r\n [curdir]=pacmat(map);\r\n [pmr, pmc]=find(map==2);\r\n\r\nif curdir\u003e0\r\n if map(ptrpac+mapdelta(curdir))==-1\r\n  % Do nothing - Ran into a Wall\r\n elseif map(ptrpac+mapdelta(curdir))\u003e2 % ran into ghost\r\n  map(ptrpac)=0; % remove PAC from the board\r\n  lives=lives-1;\r\n  if lives==0,break;end\r\n  % reset the board\r\n  [ptrgx, ptrgy]=find(map\u003e2);\r\n  ptrg=find(map\u003e2);\r\n  map(ptrg)=mod(map(ptrg),10);\r\n  map(ptrpac_start)=2;\r\n  map(ptrg_start)=[10 20 30 40];\r\n  ptrpac=find(map==2);\r\n  continue;\r\n else % legal move\r\n  map(ptrpac)=0; % Eat Dot and clear PAC\r\n  ptrpac=ptrpac+mapdelta(curdir);\r\n  if ptrpac==tunnel(1),ptrpac=tunnel(2)-nr;end\r\n  if ptrpac==tunnel(2),ptrpac=tunnel(1)+nr;end\r\n  map(ptrpac)=2;\r\n end\r\nend % curdir \u003e0\r\nend % pac2X Speed Loop\r\n\r\n% Ghosts\r\n for i=1:4\r\n\r\n  ghosts=find(map\u003e2);\r\n  ptrpac=find(map==2); % Target\r\n\r\n  dot=false;\r\n  [gptrx, gptry]=find(map==10*i);\r\n  gidx=find(map==10*i);\r\n  if isempty(gidx)\r\n   [gptrx, gptry]=find(map==10*i+1); % ghost must be on a dot\r\n   gidx=find(map==10*i+1);\r\n   dot=true;\r\n  end\r\n\r\n% Find valid ghost moves using gmap\r\n% mapdelta=[-1 nr 1 -nr]; \r\n  gmov=find(map(gidx+mapdelta)==2); % adjacent to PACMAT\r\n  if ~isempty(gmov) % PAC adjacent\r\n   lives=lives-1;\r\n   if lives==0,break;end\r\n   % reset the board\r\n   [pmr, pmc]=find(map==2); % PACMAT erase coords\r\n   map(map==2)=0;\r\n      \r\n   [ptrgx, ptrgy]=find(map\u003e2);\r\n   ptrg=find(map\u003e2);\r\n   map(ptrg)=mod(map(ptrg),10);\r\n   map(ptrpac_start)=2;\r\n   map(ptrg_start)=[10 20 30 40];\r\n   ptrpac=find(map==2);     \r\n   break; % Ghost move loop\r\n      \r\n  else % gmap no tunnel usage, Walls\r\n \r\n   gmap=map; gmap(15,1)=-1;gmap(15,28)=-1;\r\n       \r\n   ptctr=0;\r\n   gmap(gmap\u003e=0)=Inf;\r\n   \r\n% Ghost algor change   \r\n   gmap(ghosts)=-1; % other ghosts are like walls Ghosts_004/5\r\n    gmap(gidx)=Inf; % Ultimate target\r\n    gmap(ptrpac)=1; % Start at PACMAT and expand to ghost\r\n    while gmap(gidx)\u003e101 \u0026\u0026 ptctr\u003c100 % potential boxed dot\r\n % find dots, add a counter to distance form location, keep min value\r\n % when ptrpac gets a value it will be from nearest dot\r\n % find side with dmap(ptrpac)-1\r\n     ptctr=ptctr+1;\r\n     dpts=find(gmap==ptctr);\r\n     newpt_idx=repmat(dpts,1,4)+repmat(mapdelta,length(dpts),1);\r\n     gmap(newpt_idx(:))=min(gmap(newpt_idx(:)),ptctr+1);\r\n    end\r\n\r\n% Simplified by ghosts are walls: No Ghost Jumping\r\n    if ~isinf(gmap(gidx)) % Path(s) to Ghost found\r\n     for gmov=1:4 % execute with a find?\r\n       if gmap(gidx+mapdelta(gmov))==gmap(gidx)-1,break;end\r\n      end\r\n     else\r\n      gmov=[];\r\n     end\r\n \r\n   if ~isempty(gmov) % valid g move : ghost may not stand on ghost\r\n    map(gptrx,gptry)=mod(map(gptrx,gptry),10);\r\n    map(gidx+mapdelta(gmov))=map(gidx+mapdelta(gmov))+10*i;     \r\n   end % ~isempty(gmov) standard move - no capture\r\n\r\n  end % ~isempty(gmov) PACMAT adjacent\r\n  \r\n end % i ghost moves\r\nend % while alive\r\n%\r\n\r\nassert(lives\u003e0,sprintf('Twelve Captures\\n')) % ) Lives allowed\r\nassert(~isempty(any(mod(map(:),10)==1)),sprintf('Moves\\n',movepac)) \r\n\r\nscore_array=[ 9000 8000 7500 7000 6500 4000 3000 2000 1000 500 100 0];\r\nscore=score_array(lives) + movepac;\r\n  \r\nfprintf('Moves %i\\n',movepac)\r\nfprintf('Lives Remaining %i\\n',lives)\r\nfprintf('Score %i\\n',score)\r\n\r\n\r\nfeval( @assignin,'caller','score',floor(min( 10000,score )) );\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-02-03T22:19:40.000Z","updated_at":"2026-03-30T18:42:31.000Z","published_at":"2013-02-03T23:04:48.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.JPEG\"}],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Classic PACMAN game brought to Cody.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePACMAT requires clearing the Yellow Dots while avoiding the wandering ghosts in 12 lives. Adjacent Ghosts will capture PACMAT. Ghosts do not use the tunnel. On Ghost capture everyone gets reset. These trained ghosts take the minimum path to PACMAT assuming the other Ghosts are walls. PACMAT gets faster as a function of captures.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTo aid in development of your routine, a PACMAT_Ghosts_005.m file that creates a video has been posted at\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_Ghosts_005.m\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePACMAT_Ghosts_005.m\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. (Right click, 'save link as'). Using patches thus enable/figure, disable/video for best results.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"https://sites.google.com/site/razapor/matlab_cody/PACMAT_G005_video_ANC4_dbltunnel.mp4\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eAlfonso Enhanced\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (MP4) Alfonso clears at 2X speed with multiple tunnel usages.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInputs:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Map Definitions: -1=Wall, 0=Empty, 1=Dot, 2=PACMAT, \u0026gt;2=Ghost\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Direction Definitions: 1-Up, 2-Right, 3-Down, 4-Left, 0-No move\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePass Criteria:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Clear all dots\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eScoring:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[score = F(Lives Remaining) + moves\\n\\nF = [ 9000 8000 7500 7000 6500 4000 3000 2000 1000 500 100 0]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Speed as function of Lives remaining [12 8 6 4 3 2 2 2 2 2 2 1];\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eFuture:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Asteroids\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"},{\"partUri\":\"/media/image1.JPEG\",\"contentType\":\"image/JPEG\",\"content\":\"data:image/JPEG;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEsASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDzfW9Yl0ySFYkRw4J+bPHNZX/CWXX/ADwh/X/Gn+Lv9dbf7h/nWRcX0c+nWlqLK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09Rf2TP8AmRw9lepaR3SPZW1yZ4jGGmBJiJ/iTBHzfXIqlg+lejf2fZ/8+sP/AHwKPsFn/wA+sP8A3wKFw5Vu/fX4j/sip/MjhdQu1v8AUZLqOzgtFkIxBbqRGnGOAST2z1rvof8Aj3i/3B/KovsFn/z6w/8AfAqwQB8o6DgV6+U5ZPBOXNK97HfgcHKg5Xe5/9k=\"}]}"},{"id":54715,"title":"Weird Diagonal Matrix!!","description":"**If you have loved the problem, please like it below(Request)**\r\nGiven an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n.\r\nFor example:\r\nn=2\r\nz =\r\n\r\n     1     0     0\r\n     0     2     2\r\n     0     2     2\r\nn=3\r\nz =\r\n\r\n     1     0     0     0     0     0\r\n     0     2     2     0     0     0\r\n     0     2     2     0     0     0\r\n     0     0     0     3     3     3\r\n     0     0     0     3     3     3\r\n     0     0     0     3     3     3","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 427.344px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 406.493px 213.663px; transform-origin: 406.493px 213.672px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e**If you have loved the problem, please like it below(Request)**\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eGiven an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eFor example:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003en=2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 102.083px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 403.507px 51.0417px; transform-origin: 403.507px 51.0417px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ez =\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     1     0     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     2     2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     2     2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.9896px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 383.49px 10.4861px; text-align: left; transform-origin: 383.498px 10.4948px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003en=3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 163.333px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 403.507px 81.6667px; transform-origin: 403.507px 81.6667px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ez =\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     1     0     0     0     0     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     2     2     0     0     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     2     2     0     0     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     0     0     3     3     3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     0     0     3     3     3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4167px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1.11111px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1.11111px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1.11111px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1.11111px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 403.507px 10.2083px; transform-origin: 403.507px 10.2083px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     0     0     0     3     3     3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function z=diagMatrix(x)\r\n\r\nend","test_suite":"%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(isequal(diagMatrix(x),y_correct))\r\n%%\r\nx=3;\r\ny_correct = [     1     0     0     0     0     0\r\n     0     2     2     0     0     0\r\n     0     2     2     0     0     0\r\n     0     0     0     3     3     3\r\n     0     0     0     3     3     3\r\n     0     0     0     3     3     3];\r\nassert(isequal(diagMatrix(x),y_correct))\r\n%%\r\nx = 4;\r\ny_correct = [1     0     0     0     0     0     0     0     0     0\r\n     0     2     2     0     0     0     0     0     0     0\r\n     0     2     2     0     0     0     0     0     0     0\r\n     0     0     0     3     3     3     0     0     0     0\r\n     0     0     0     3     3     3     0     0     0     0\r\n     0     0     0     3     3     3     0     0     0     0\r\n     0     0     0     0     0     0     4     4     4     4\r\n     0     0     0     0     0     0     4     4     4     4\r\n     0     0     0     0     0     0     4     4     4     4\r\n     0     0     0     0     0     0     4     4     4     4]\r\n%%\r\nx=8;\r\ny_correct = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8];\r\nassert(isequal(diagMatrix(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":1274403,"edited_by":1274403,"edited_at":"2022-06-13T18:48:46.000Z","deleted_by":null,"deleted_at":null,"solvers_count":19,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-06-06T04:17:20.000Z","updated_at":"2026-01-28T13:05:07.000Z","published_at":"2022-06-06T04:39:45.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e**If you have loved the problem, please like it below(Request)**\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eGiven an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eFor example:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003en=2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[z =\\n\\n     1     0     0\\n     0     2     2\\n     0     2     2]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003en=3\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[z =\\n\\n     1     0     0     0     0     0\\n     0     2     2     0     0     0\\n     0     2     2     0     0     0\\n     0     0     0     3     3     3\\n     0     0     0     3     3     3\\n     0     0     0     3     3     3]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":772,"title":"TRON Tourney 000 : Clockwise Wall Hugger","description":"TRON Tournament is based upon the excellent TRON Challenge, \u003chttp://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge Cody 327\u003e, created by Alfonso Nieto-Castanon.\r\n\r\nI will implement, as practical, winning Player TRON-bots as Host TRON-bots.\r\n\r\nThe Passing criteria is changed to Wins - Ties/4 \u003e Losses.\r\n\r\nThe 100 Matches will be \"even\" as Host and Player will play the same 50 paired starting positions.\r\n\r\nThe Host TRON-bot will be provided in the function template.\r\nIt is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\r\n\r\nThe TRON arena is fixed at 50x50.\r\n\r\nPlease visit the Cody 327 link for any info I may miss.\r\n\r\n\r\nBoard: 50x50\r\n\r\nWall: -3 (Rows 1 and 50, Columns 1 and 50)\r\n\r\nPlayer: 1\r\n\r\nHost: 2\r\n\r\nPlayer created wall: -1\r\n\r\nHost created wall: -2\r\n\r\n\r\nEmpty Spaces: 0\r\n\r\nPlayers start on either row 2 or column 2\r\n\r\nPlayers move simultaneously and thus a crash to the same spot is a tie.\r\n\r\nRunning into walls is a loss. \r\n\r\nSimultaneous wall crashing is a tie.\r\n\r\nGiven the board with its coverage make a Move, \"NESW\".\r\n\r\n\"N\" idx-1; \"E\" idx+50, \"S\" idx+1, and \"W\" is idx-50.\r\n\r\n*Input:* Board\r\n\r\n*Output:* (string 1 character) eg \"N\"\r\n\r\n*Score:* Perfect Score is 0 points (200-Wins*2-Ties/2)\r\n\r\nThe Test Suite has some very nice methods to implement checks.\r\n\r\nBot 000 is Alfonso's Clockwise Exterior Wall Hugger\r\n","description_html":"\u003cp\u003eTRON Tournament is based upon the excellent TRON Challenge, \u003ca href=\"http://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge\"\u003eCody 327\u003c/a\u003e, created by Alfonso Nieto-Castanon.\u003c/p\u003e\u003cp\u003eI will implement, as practical, winning Player TRON-bots as Host TRON-bots.\u003c/p\u003e\u003cp\u003eThe Passing criteria is changed to Wins - Ties/4 \u003e Losses.\u003c/p\u003e\u003cp\u003eThe 100 Matches will be \"even\" as Host and Player will play the same 50 paired starting positions.\u003c/p\u003e\u003cp\u003eThe Host TRON-bot will be provided in the function template.\r\nIt is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\u003c/p\u003e\u003cp\u003eThe TRON arena is fixed at 50x50.\u003c/p\u003e\u003cp\u003ePlease visit the Cody 327 link for any info I may miss.\u003c/p\u003e\u003cp\u003eBoard: 50x50\u003c/p\u003e\u003cp\u003eWall: -3 (Rows 1 and 50, Columns 1 and 50)\u003c/p\u003e\u003cp\u003ePlayer: 1\u003c/p\u003e\u003cp\u003eHost: 2\u003c/p\u003e\u003cp\u003ePlayer created wall: -1\u003c/p\u003e\u003cp\u003eHost created wall: -2\u003c/p\u003e\u003cp\u003eEmpty Spaces: 0\u003c/p\u003e\u003cp\u003ePlayers start on either row 2 or column 2\u003c/p\u003e\u003cp\u003ePlayers move simultaneously and thus a crash to the same spot is a tie.\u003c/p\u003e\u003cp\u003eRunning into walls is a loss.\u003c/p\u003e\u003cp\u003eSimultaneous wall crashing is a tie.\u003c/p\u003e\u003cp\u003eGiven the board with its coverage make a Move, \"NESW\".\u003c/p\u003e\u003cp\u003e\"N\" idx-1; \"E\" idx+50, \"S\" idx+1, and \"W\" is idx-50.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e Board\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e (string 1 character) eg \"N\"\u003c/p\u003e\u003cp\u003e\u003cb\u003eScore:\u003c/b\u003e Perfect Score is 0 points (200-Wins*2-Ties/2)\u003c/p\u003e\u003cp\u003eThe Test Suite has some very nice methods to implement checks.\u003c/p\u003e\u003cp\u003eBot 000 is Alfonso's Clockwise Exterior Wall Hugger\u003c/p\u003e","function_template":"function move=tron(board)\r\n% Creator: Alfonso Nieto-Castanon\r\n% Botname: Base Clockwise Wall Hugger\r\n% Date: Early 2012\r\n% This is the Host bot of TRON Tourney 000\r\n str='NESW';\r\n D=[-1,50,1,-50];\r\n i=find(board==2); \r\n [nill,j]=max(~board(i+D)+.5*(board(i-D)==-2));\r\n move=str(j);\r\nend","test_suite":"%%\r\n% Core Code based upon TRON Cody 327 by Alfonso Nieto-Castanon\r\n% Tweaked to have 50 paired matches that swap starting positions\r\n% Passing Criteria modified to W-Ties/4 \u003e Losses\r\n% 10% of all matches against perfect bot are guaranteed losses\r\nglobal scr\r\n\r\n  doDraw=false; %set to true for display\r\n  %doDraw=true; %set to true for display\r\n  params=struct('n',50,'str','NESW','D',[-1,50,1,-50],'wins',[0,0,0]);\r\n   \r\n  y=clock;\r\n  rand('state',10000*y(6)); \r\n % rand('state',0); % Modify to make non-repeating\r\n  for nboards=1:50 \r\n      % initialize board\r\n      params.board=zeros(params.n);\r\n      params.board([1,end],:)=-3;\r\n      params.board(:,[1,end])=-3;\r\n      [i,j]=find(params.board|1); % creates idx  to [r,c] via magic\r\n      [nill,pos1]=max((i==2|j==2)+~params.board(:)+rand(params.n*params.n,1));\r\n      params.board(pos1)=1;\r\n      [nill,pos2]=max((i==2|j==2)+~params.board(:)+rand(params.n*params.n,1));\r\n      params.board(pos2)=2;\r\n      orig_pos1=pos1;\r\n      orig_pos2=pos2;\r\n   for game=1:2 \r\n       \r\n       if game==2 % Play reversed starting positions\r\n        params.board=zeros(params.n);\r\n        params.board([1,end],:)=-3;\r\n        params.board(:,[1,end])=-3;\r\n        pos1=orig_pos2;\r\n        pos2=orig_pos1;\r\n        params.board(pos1)=1;\r\n        params.board(pos2)=2;\r\n       end\r\n      \r\n      while 1\r\n          % blue's next movement\r\n          params.state=rand('state');\r\n          assignin('caller','params',params);\r\n       try   \r\n        d1=tron(params.board); % Player Move\r\n       catch\r\n        d1='S'; % Move S on error\r\n       end\r\n          \r\n          params=evalin('caller','params');\r\n          rand('state',params.state);\r\n          \r\n          \r\n          % red's next movement\r\n          i=find(params.board==2);\r\n          [nill,j]=max(~params.board(i+params.D)+.5*(params.board(i-params.D)==-2));\r\n          d2=params.str(j);\r\n       \r\n\r\n          % evaluate movements\r\n          d1=findstr(params.str,d1);\r\n          d2=findstr(params.str,d2);\r\n          \r\n          assert(~isempty(d1));          \r\n          params.board(pos1)=-1;\r\n          params.board(pos2)=-2;\r\n          pos1=pos1+params.D(d1);\r\n          pos2=pos2+params.D(d2);\r\n          if pos1==pos2||(params.board(pos1)\u0026\u0026params.board(pos2)), %tie\r\n              params.wins(2)=params.wins(2)+1;\r\n              if doDraw, disp('tie'); end\r\n              break;\r\n          elseif params.board(pos1), %lose\r\n              if doDraw, disp('lose'); end\r\n              %pause(0.5)\r\n              params.wins(3)=params.wins(3)+1;\r\n              break;\r\n          elseif params.board(pos2), %win\r\n              if doDraw, disp('win'); end\r\n              params.wins(1)=params.wins(1)+1;\r\n              break;\r\n          end\r\n          params.board(pos1)=1;\r\n          params.board(pos2)=2;\r\n          if doDraw\r\n              image(4+params.board);\r\n              axis equal off;\r\n              colormap([1,1,1;.5,0,0;0,0,.5;0,0,0;0,0,1;1,0,0]);\r\n              set(gcf,'color','k');\r\n              drawnow;\r\n          end\r\n      end\r\n      if doDraw, pause; end\r\n      \r\n   end % game\r\n  end % nboards\r\n    \r\n  disp(sprintf('%d wins; %d ties; %d losses',params.wins));\r\n\r\n% Make the size equal to 2*score\r\nscr=max(0,100-params.wins(1)-params.wins(2)/4);\r\n\r\n\r\n% W-T/4 \u003e Losses to Pass\r\nassert(params.wins(1)-params.wins(2)/4\u003eparams.wins(3),sprintf('%d wins; %d ties; %d losses',params.wins));\r\n\r\n%fh=fopen('tron.m','wt');\r\n%fprintf(fh,'%s\\n',repmat('1;',[1,floor(scr)]) );\r\n%fclose(fh);\r\n%%\r\nglobal scr\r\n\r\nfeval(@assignin,'caller','score',floor(2*scr));\r\n\r\n%fh=fopen('tron.m','wt');\r\n%fprintf(fh,'%s\\n',repmat('1;',[1,floor(scr)]) );\r\n%fclose(fh);\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":"2012-11-24T16:01:31.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-06-17T02:35:05.000Z","updated_at":"2012-11-24T16:01:31.000Z","published_at":"2012-06-17T04:05:26.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTRON Tournament is based upon the excellent TRON Challenge,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCody 327\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, created by Alfonso Nieto-Castanon.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eI will implement, as practical, winning Player TRON-bots as Host TRON-bots.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Passing criteria is changed to Wins - Ties/4 \u0026gt; Losses.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe 100 Matches will be \\\"even\\\" as Host and Player will play the same 50 paired starting positions.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe TRON arena is fixed at 50x50.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlease visit the Cody 327 link for any info I may miss.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBoard: 50x50\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWall: -3 (Rows 1 and 50, Columns 1 and 50)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer: 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost: 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer created wall: -1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost created wall: -2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEmpty Spaces: 0\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayers start on either row 2 or column 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayers move simultaneously and thus a crash to the same spot is a tie.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRunning into walls is a loss.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSimultaneous wall crashing is a tie.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven the board with its coverage make a Move, \\\"NESW\\\".\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\"N\\\" idx-1; \\\"E\\\" idx+50, \\\"S\\\" idx+1, and \\\"W\\\" is idx-50.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Board\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (string 1 character) eg \\\"N\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eScore:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Perfect Score is 0 points (200-Wins*2-Ties/2)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Test Suite has some very nice methods to implement checks.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBot 000 is Alfonso's Clockwise Exterior Wall Hugger\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":773,"title":"TRON Tourney 010: Fixed Pattern CCW","description":"TRON Tournament is based upon the excellent TRON Challenge, \u003chttp://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge Cody 327\u003e, created by Alfonso Nieto-Castanon.\r\n\r\nHost Bot: Fixed Pattern CCW - Weak \r\n\r\nThe Passing criteria is changed to Wins - Ties/4 \u003e Losses.\r\n\r\nThe 100 Matches will be \"even\" as Host and Player will play the same 50 paired starting positions.\r\n\r\nThe Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\r\n\r\nThe TRON arena is fixed at 50x50.\r\n\r\nPlease visit the Cody 327 link for any info I may miss.\r\n\r\nBoard: 50x50\r\n\r\nWall: -3 (Rows 1 and 50, Columns 1 and 50)\r\n\r\nPlayer: 1\r\n\r\nHost: 2\r\n\r\nPlayer created wall: -1\r\n\r\nHost created wall: -2\r\n\r\nEmpty Spaces: 0\r\n\r\nPlayers start on either row 2 or column 2\r\n\r\nPlayers move simultaneously and thus a crash to the same spot is a tie.\r\n\r\nRunning into a wall first is a loss.\r\n\r\nSimultaneous wall crashing is a tie.\r\n\r\nGiven the board with its coverage make a Move, \"NESW\".\r\n\r\n\"N\" idx-1; \"E\" idx+50, \"S\" idx+1, and \"W\" is idx-50.\r\n\r\n*Input:* Board\r\n\r\n*Output:* (string 1 character) eg \"N\"\r\n\r\n*Score:* Perfect Score is 0 points (200-Wins*2-Ties/2), 100 L scores 200\r\n\r\nThe Test Suite has some very nice methods to implement checks.\r\n\r\nBot 010 is Rick's CCW Fixed Pattern Bot - Weak","description_html":"\u003cp\u003eTRON Tournament is based upon the excellent TRON Challenge, \u003ca href=\"http://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge\"\u003eCody 327\u003c/a\u003e, created by Alfonso Nieto-Castanon.\u003c/p\u003e\u003cp\u003eHost Bot: Fixed Pattern CCW - Weak\u003c/p\u003e\u003cp\u003eThe Passing criteria is changed to Wins - Ties/4 \u003e Losses.\u003c/p\u003e\u003cp\u003eThe 100 Matches will be \"even\" as Host and Player will play the same 50 paired starting positions.\u003c/p\u003e\u003cp\u003eThe Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\u003c/p\u003e\u003cp\u003eThe TRON arena is fixed at 50x50.\u003c/p\u003e\u003cp\u003ePlease visit the Cody 327 link for any info I may miss.\u003c/p\u003e\u003cp\u003eBoard: 50x50\u003c/p\u003e\u003cp\u003eWall: -3 (Rows 1 and 50, Columns 1 and 50)\u003c/p\u003e\u003cp\u003ePlayer: 1\u003c/p\u003e\u003cp\u003eHost: 2\u003c/p\u003e\u003cp\u003ePlayer created wall: -1\u003c/p\u003e\u003cp\u003eHost created wall: -2\u003c/p\u003e\u003cp\u003eEmpty Spaces: 0\u003c/p\u003e\u003cp\u003ePlayers start on either row 2 or column 2\u003c/p\u003e\u003cp\u003ePlayers move simultaneously and thus a crash to the same spot is a tie.\u003c/p\u003e\u003cp\u003eRunning into a wall first is a loss.\u003c/p\u003e\u003cp\u003eSimultaneous wall crashing is a tie.\u003c/p\u003e\u003cp\u003eGiven the board with its coverage make a Move, \"NESW\".\u003c/p\u003e\u003cp\u003e\"N\" idx-1; \"E\" idx+50, \"S\" idx+1, and \"W\" is idx-50.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e Board\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e (string 1 character) eg \"N\"\u003c/p\u003e\u003cp\u003e\u003cb\u003eScore:\u003c/b\u003e Perfect Score is 0 points (200-Wins*2-Ties/2), 100 L scores 200\u003c/p\u003e\u003cp\u003eThe Test Suite has some very nice methods to implement checks.\u003c/p\u003e\u003cp\u003eBot 010 is Rick's CCW Fixed Pattern Bot - Weak\u003c/p\u003e","function_template":"function move=tron(board)\r\n% Creator: Richard Zapor\r\n% BotName: Map50 vs Clockwise Bot\r\n% Fixed Pattern Bot - Very Weak but Crushes CW Wall Hugger\r\n% Date: 6/8/2012\r\n  str='NESW';\r\n  map50=str2num('reshape([ones(1,101)*2 ones(1,46)*3 2 2 zeros(1,2202) 3 4 4 ones(1,47) 3 4 zeros(1,97)],50,50)+(reshape([zeros(1,53) ones(1,44)*3 zeros(1,6) ones(1,44)*4 zeros(1,6) 3 ones(1,43)*4 zeros(1,6) ones(1,43)*2 3 zeros(1,2106) ones(1,44)*2 zeros(1,6) ones(1,44)*2 zeros(1,53)],50,50))''');\r\n  try\r\n   move=str(map50(find(board==1)));  \r\n  catch\r\n   move='S';\r\n  end\r\nend","test_suite":"% Passing Criteria modified to W-Ties/4 \u003e Losses\r\n% 10% of all matches against perfect bot are guaranteed losses\r\nglobal scr\r\n\r\n  doDraw=false; %set to true for display\r\n  %doDraw=true; %set to true for display\r\n  params=struct('n',50,'str','NESW','D',[-1,50,1,-50],'wins',[0,0,0]);\r\n   \r\n  y=clock;\r\n  rand('state',10000*y(6)); \r\n  map50=str2num('reshape([ones(1,101)*2 ones(1,46)*3 2 2 zeros(1,2202) 3 4 4 ones(1,47) 3 4 zeros(1,97)],50,50)+(reshape([zeros(1,53) ones(1,44)*3 zeros(1,6) ones(1,44)*4 zeros(1,6) 3 ones(1,43)*4 zeros(1,6) ones(1,43)*2 3 zeros(1,2106) ones(1,44)*2 zeros(1,6) ones(1,44)*2 zeros(1,53)],50,50))''');\r\n % rand('state',0); % Modify to make non-repeating\r\n  for nboards=1:50 \r\n      % initialize board\r\n      params.board=zeros(params.n);\r\n      params.board([1,end],:)=-3;\r\n      params.board(:,[1,end])=-3;\r\n      [i,j]=find(params.board|1); % creates idx  to [r,c] via magic\r\n      [nill,pos1]=max((i==2|j==2)+~params.board(:)+rand(params.n*params.n,1));\r\n      params.board(pos1)=1;\r\n      [nill,pos2]=max((i==2|j==2)+~params.board(:)+rand(params.n*params.n,1));\r\n      params.board(pos2)=2;\r\n      orig_pos1=pos1;\r\n      orig_pos2=pos2;\r\n   for game=1:2 \r\n       \r\n       if game==2 % Play reversed starting positions\r\n        params.board=zeros(params.n);\r\n        params.board([1,end],:)=-3;\r\n        params.board(:,[1,end])=-3;\r\n        pos1=orig_pos2;\r\n        pos2=orig_pos1;\r\n        params.board(pos1)=1;\r\n        params.board(pos2)=2;\r\n       end\r\n      \r\n      while 1\r\n          % blue's next movement\r\n          params.state=rand('state');\r\n          assignin('caller','params',params);\r\n      try    \r\n        d1=tron(params.board); % Player Move\r\n      catch\r\n        d1='S';\r\n       end\r\n          \r\n          params=evalin('caller','params');\r\n          rand('state',params.state);\r\n          \r\n          \r\n          % red's next movement\r\n% Creator: Richard Zapor\r\n% BotName: Map50 vs Clockwise Bot\r\n% Date: 6/8/2012\r\n  str='NESW';\r\n%  map50=str2num('reshape([ones(1,101)*2 ones(1,46)*3 2 2 zeros(1,2202) 3 4 4 ones(1,47) 3 4 zeros(1,97)],50,50)+(reshape([zeros(1,53) ones(1,44)*3 zeros(1,6) ones(1,44)*4 zeros(1,6) 3 ones(1,43)*4 zeros(1,6) ones(1,43)*2 3 zeros(1,2106) ones(1,44)*2 zeros(1,6) ones(1,44)*2 zeros(1,53)],50,50))''');\r\n  try\r\n   move=str(map50(find(params.board==2)));  \r\n  catch\r\n   move='S';\r\n  end\r\n  d2=move;\r\n       \r\n\r\n          % evaluate movements\r\n          d1=findstr(params.str,d1);\r\n          d2=findstr(params.str,d2);\r\n          \r\n          assert(~isempty(d1));          \r\n          params.board(pos1)=-1;\r\n          params.board(pos2)=-2;\r\n          pos1=pos1+params.D(d1);\r\n          pos2=pos2+params.D(d2);\r\n          if pos1==pos2||(params.board(pos1)\u0026\u0026params.board(pos2)), %tie\r\n              params.wins(2)=params.wins(2)+1;\r\n              if doDraw, disp('tie'); end\r\n              break;\r\n          elseif params.board(pos1), %lose\r\n              if doDraw, disp('lose'); end\r\n              %pause(0.5)\r\n              params.wins(3)=params.wins(3)+1;\r\n              break;\r\n          elseif params.board(pos2), %win\r\n              if doDraw, disp('win'); end\r\n              params.wins(1)=params.wins(1)+1;\r\n              break;\r\n          end\r\n          params.board(pos1)=1;\r\n          params.board(pos2)=2;\r\n          if doDraw\r\n              image(4+params.board);\r\n              axis equal off;\r\n              colormap([1,1,1;.5,0,0;0,0,.5;0,0,0;0,0,1;1,0,0]);\r\n              set(gcf,'color','k');\r\n              drawnow;\r\n          end\r\n      end\r\n      if doDraw, pause; end\r\n      \r\n   end % game\r\n  end % nboards\r\n    \r\n  disp(sprintf('%d wins; %d ties; %d losses',params.wins));\r\n\r\n% Make the size equal to 100-W-T/4  Perfect=0, 100 L scores 200\r\nscr=100-params.wins(1)-params.wins(2)/4;\r\n\r\n\r\n% W-T/4 \u003e Losses to Pass\r\nassert(params.wins(1)-params.wins(2)/4\u003eparams.wins(3),sprintf('%d wins; %d ties; %d losses',params.wins));\r\n%%\r\n% Implement tron.m resizing to scr when assert W-T/4\u003eL  Fails\r\nglobal scr\r\n\r\nfeval(@assignin,'caller','score',floor(2*scr));\r\n\r\n%fh=fopen('tron.m','wt');\r\n%fprintf(fh,'%s\\n',repmat('1;',[1,floor(scr)]) );\r\n%fclose(fh);","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":"2012-11-24T15:58:19.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-06-18T00:51:07.000Z","updated_at":"2012-11-24T15:58:19.000Z","published_at":"2012-06-18T03:16:51.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTRON Tournament is based upon the excellent TRON Challenge,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.mathworks.com/matlabcentral/cody/problems/327-tron-challenge\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCody 327\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, created by Alfonso Nieto-Castanon.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost Bot: Fixed Pattern CCW - Weak\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Passing criteria is changed to Wins - Ties/4 \u0026gt; Losses.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe 100 Matches will be \\\"even\\\" as Host and Player will play the same 50 paired starting positions.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe TRON arena is fixed at 50x50.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlease visit the Cody 327 link for any info I may miss.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBoard: 50x50\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWall: -3 (Rows 1 and 50, Columns 1 and 50)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer: 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost: 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer created wall: -1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHost created wall: -2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEmpty Spaces: 0\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayers start on either row 2 or column 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayers move simultaneously and thus a crash to the same spot is a tie.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRunning into a wall first is a loss.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSimultaneous wall crashing is a tie.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven the board with its coverage make a Move, \\\"NESW\\\".\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\"N\\\" idx-1; \\\"E\\\" idx+50, \\\"S\\\" idx+1, and \\\"W\\\" is idx-50.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Board\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e (string 1 character) eg \\\"N\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eScore:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Perfect Score is 0 points (200-Wins*2-Ties/2), 100 L scores 200\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe Test Suite has some very nice methods to implement checks.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBot 010 is Rick's CCW Fixed Pattern Bot - Weak\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":821,"title":"Pentago: find winning move","description":"\u003chttp://en.wikipedia.org/wiki/Pentago Pentago\u003e is a challenging two-player strategy game. The objective is to be the first player to connect five marbles in a row (horizontally, vertically, or diagonally) on the board. The 6x6 board consists of four 3x3 game blocks, each of which can be twisted in 90-degree intervals (CW/CCW).  During a turn, a player places a marble anywhere on the board and _then_ rotates one of the game blocks 90 degrees in either direction. The marble does not have to be played on the same block that is rotated.\r\n\r\nFor this problem, you are given a 6x6 matrix representing the current board setup, where 0s, 1s, and 2s correspond to empty spaces, Player 1 marbles, and Player 2 marbles, respectively. You are Player 1 and it is your turn. If there is a winning move, return the row and column subscripts of the winning play as well as the required rotation (see below for details). If you can win without rotating a game block, return [] for the second output. If there is no winning move on this turn, both outputs should be []. You may assume that there will be only one winning move, if any.\r\n\r\n*Input:*\r\n\r\n* _board_ - 6x6 matrix of filled with 0-2\r\n\r\n*Output:*\r\n\r\n* _pos_ - 1x2 vector with row and column of winning move (if any).\r\n* _rot_ - 2x2 matrix describing rotation required to win (if any). A CW rotation is indicated by a 1, while a CCW rotation is indicated by a -1. For example,\r\n\r\n  rot = [-1 0\r\n          0 0]   \r\n\r\nmeans the top-left game block was rotated 90 degrees in the counterclockwise direction.\r\n\r\n  rot = [0 0\r\n         0 1]\r\n\r\nmeans the bottom-right game block was rotated 90 degrees in the clockwise direction.\r\n\r\n*Example*\r\n\r\n  board = 0 0 0 0 2 0\r\n          1 1 1 2 1 0\r\n          0 0 0 0 0 0\r\n          0 2 0 2 0 0\r\n          0 1 0 0 0 0\r\n          0 0 0 0 0 0\r\n\r\nshould return\r\n\r\n  pos = [3 5]\r\n  rot = [0 1\r\n         0 0]\r\n\r\nbecause placing a marble at (3,5) yields\r\n\r\n  0 0 0 0 2 0\r\n  1 1 1 2 1 0\r\n  0 0 0 0 1 0\r\n  0 2 0 2 0 0\r\n  0 1 0 0 0 0\r\n  0 0 0 0 0 0\r\n\r\nand then rotating the top-right block CW yields\r\n\r\n\r\n  0 0 0 0 2 0\r\n  1 1 1 1 1 2\r\n  0 0 0 0 0 0\r\n  0 2 0 2 0 0\r\n  0 1 0 0 0 0\r\n  0 0 0 0 0 0\r\n\r\nwhich gives Player 1 the win with 5 in a row (see 2nd row).","description_html":"\u003cp\u003e\u003ca href=\"http://en.wikipedia.org/wiki/Pentago\"\u003ePentago\u003c/a\u003e is a challenging two-player strategy game. The objective is to be the first player to connect five marbles in a row (horizontally, vertically, or diagonally) on the board. The 6x6 board consists of four 3x3 game blocks, each of which can be twisted in 90-degree intervals (CW/CCW).  During a turn, a player places a marble anywhere on the board and \u003ci\u003ethen\u003c/i\u003e rotates one of the game blocks 90 degrees in either direction. The marble does not have to be played on the same block that is rotated.\u003c/p\u003e\u003cp\u003eFor this problem, you are given a 6x6 matrix representing the current board setup, where 0s, 1s, and 2s correspond to empty spaces, Player 1 marbles, and Player 2 marbles, respectively. You are Player 1 and it is your turn. If there is a winning move, return the row and column subscripts of the winning play as well as the required rotation (see below for details). If you can win without rotating a game block, return [] for the second output. If there is no winning move on this turn, both outputs should be []. You may assume that there will be only one winning move, if any.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e\u003c/p\u003e\u003cul\u003e\u003cli\u003e\u003ci\u003eboard\u003c/i\u003e - 6x6 matrix of filled with 0-2\u003c/li\u003e\u003c/ul\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e\u003c/p\u003e\u003cul\u003e\u003cli\u003e\u003ci\u003epos\u003c/i\u003e - 1x2 vector with row and column of winning move (if any).\u003c/li\u003e\u003cli\u003e\u003ci\u003erot\u003c/i\u003e - 2x2 matrix describing rotation required to win (if any). A CW rotation is indicated by a 1, while a CCW rotation is indicated by a -1. For example,\u003c/li\u003e\u003c/ul\u003e\u003cpre class=\"language-matlab\"\u003erot = [-1 0\r\n        0 0]   \r\n\u003c/pre\u003e\u003cp\u003emeans the top-left game block was rotated 90 degrees in the counterclockwise direction.\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003erot = [0 0\r\n       0 1]\r\n\u003c/pre\u003e\u003cp\u003emeans the bottom-right game block was rotated 90 degrees in the clockwise direction.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eboard = 0 0 0 0 2 0\r\n        1 1 1 2 1 0\r\n        0 0 0 0 0 0\r\n        0 2 0 2 0 0\r\n        0 1 0 0 0 0\r\n        0 0 0 0 0 0\r\n\u003c/pre\u003e\u003cp\u003eshould return\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003epos = [3 5]\r\nrot = [0 1\r\n       0 0]\r\n\u003c/pre\u003e\u003cp\u003ebecause placing a marble at (3,5) yields\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e0 0 0 0 2 0\r\n1 1 1 2 1 0\r\n0 0 0 0 1 0\r\n0 2 0 2 0 0\r\n0 1 0 0 0 0\r\n0 0 0 0 0 0\r\n\u003c/pre\u003e\u003cp\u003eand then rotating the top-right block CW yields\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e0 0 0 0 2 0\r\n1 1 1 1 1 2\r\n0 0 0 0 0 0\r\n0 2 0 2 0 0\r\n0 1 0 0 0 0\r\n0 0 0 0 0 0\r\n\u003c/pre\u003e\u003cp\u003ewhich gives Player 1 the win with 5 in a row (see 2nd row).\u003c/p\u003e","function_template":"function [pos rot] = pentago_win(board)\r\n  pos = [];\r\n  rot = [];\r\nend","test_suite":"%%\r\nboard =[0 0 0 0 2 1\r\n        1 2 2 2 1 0\r\n        0 0 0 1 0 0\r\n        0 2 1 2 0 0\r\n        0 0 0 0 0 0\r\n        0 0 0 0 0 0];\r\npos_correct = [5 2];\r\nrot_correct = [];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))\r\n\r\n%%\r\nboard =[0 0 0 0 1 0\r\n        1 2 2 2 1 0\r\n        0 0 0 1 1 0\r\n        0 2 2 2 0 0\r\n        0 2 0 1 0 0\r\n        0 0 0 0 0 0];\r\npos_correct = [5 5];\r\nrot_correct = [0 0;0 1];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))\r\n\r\n%%\r\nboard =[0 0 1 1 1 2\r\n        2 2 0 2 2 0\r\n        0 0 1 0 1 0\r\n        0 2 0 2 0 0\r\n        0 0 0 1 0 0\r\n        0 0 0 0 0 0];\r\npos_correct = [2 3];\r\nrot_correct = [-1 0;0 0];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))\r\n\r\n%%\r\nboard =[1 0 2 1 1 2\r\n        2 0 0 2 2 0\r\n        0 0 1 0 1 0\r\n        1 2 0 2 0 0\r\n        0 1 2 1 0 0\r\n        0 0 1 2 0 0];\r\npos_correct = [];\r\nrot_correct = [];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))\r\n\r\n%%\r\nboard =[1 0 2 1 2 0\r\n        2 0 0 2 1 0\r\n        0 0 1 1 2 0\r\n        2 2 0 2 0 0\r\n        0 1 2 1 0 0\r\n        0 0 1 2 0 1];\r\npos_correct = [1 6];\r\nrot_correct = [0 0;-1 0];\r\n[pos rot] = pentago_win(board);\r\nassert(isequal(pos,pos_correct) \u0026\u0026 isequal(rot,rot_correct))","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":4793,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":35,"test_suite_updated_at":"2012-07-09T21:39:10.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-07-09T20:36:50.000Z","updated_at":"2026-02-15T07:32:20.000Z","published_at":"2012-07-09T21:39:10.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"http://en.wikipedia.org/wiki/Pentago\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePentago\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is a challenging two-player strategy game. The objective is to be the first player to connect five marbles in a row (horizontally, vertically, or diagonally) on the board. The 6x6 board consists of four 3x3 game blocks, each of which can be twisted in 90-degree intervals (CW/CCW). During a turn, a player places a marble anywhere on the board and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethen\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e rotates one of the game blocks 90 degrees in either direction. The marble does not have to be played on the same block that is rotated.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor this problem, you are given a 6x6 matrix representing the current board setup, where 0s, 1s, and 2s correspond to empty spaces, Player 1 marbles, and Player 2 marbles, respectively. You are Player 1 and it is your turn. If there is a winning move, return the row and column subscripts of the winning play as well as the required rotation (see below for details). If you can win without rotating a game block, return [] for the second output. If there is no winning move on this turn, both outputs should be []. You may assume that there will be only one winning move, if any.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eboard\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e - 6x6 matrix of filled with 0-2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003epos\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e - 1x2 vector with row and column of winning move (if any).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003erot\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e - 2x2 matrix describing rotation required to win (if any). A CW rotation is indicated by a 1, while a CCW rotation is indicated by a -1. For example,\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[rot = [-1 0\\n        0 0]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003emeans the top-left game block was rotated 90 degrees in the counterclockwise direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[rot = [0 0\\n       0 1]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003emeans the bottom-right game block was rotated 90 degrees in the clockwise direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[board = 0 0 0 0 2 0\\n        1 1 1 2 1 0\\n        0 0 0 0 0 0\\n        0 2 0 2 0 0\\n        0 1 0 0 0 0\\n        0 0 0 0 0 0]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eshould return\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[pos = [3 5]\\nrot = [0 1\\n       0 0]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ebecause placing a marble at (3,5) yields\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[0 0 0 0 2 0\\n1 1 1 2 1 0\\n0 0 0 0 1 0\\n0 2 0 2 0 0\\n0 1 0 0 0 0\\n0 0 0 0 0 0]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eand then rotating the top-right block CW yields\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[0 0 0 0 2 0\\n1 1 1 1 1 2\\n0 0 0 0 0 0\\n0 2 0 2 0 0\\n0 1 0 0 0 0\\n0 0 0 0 0 0]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ewhich gives Player 1 the win with 5 in a row (see 2nd row).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2291,"title":"GJam 2014 Qualifier: Deceitful War (Small)","description":"This Challenge is derived from \u003chttp://code.google.com/codejam/contest/2974486/dashboard#s=p3 GJam 2014 Qualifier Deceitful War\u003e.\r\n\r\nMy condensed summary of the problem statement.\r\n\r\nGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\r\n\r\nUnsurprisingly when A truthfully states masses player B consistently wins.\r\n\r\nPlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\r\n\r\nPart one is determine the best possible score for A when playing deceitfully.\r\n\r\nPart two is determine the best possible score if player A did not look and is honest.\r\n\r\n*Examples:*\r\n\r\n  A: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\r\n  \r\n  A 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\n  B 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\n  Deceitful A Wins 8\r\n  Optimal Honest A Wins 4\r\n\r\n*Input:* A,B vectors of length N (Small has N\u003c=10, Large(future challenge N\u003c=1000)\r\n\r\n*Output:* Deceitful Wins, Optimal Honest Wins\r\n\r\n\r\n\r\n\r\n\r\n*Note:*\r\n\r\nIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error. \u003chttp://www.go-hero.net/jam/14/solutions/0/4/MATLAB GJam Deceitful Solutions\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.","description_html":"\u003cp\u003eThis Challenge is derived from \u003ca href = \"http://code.google.com/codejam/contest/2974486/dashboard#s=p3\"\u003eGJam 2014 Qualifier Deceitful War\u003c/a\u003e.\u003c/p\u003e\u003cp\u003eMy condensed summary of the problem statement.\u003c/p\u003e\u003cp\u003eGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\u003c/p\u003e\u003cp\u003eUnsurprisingly when A truthfully states masses player B consistently wins.\u003c/p\u003e\u003cp\u003ePlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\u003c/p\u003e\u003cp\u003ePart one is determine the best possible score for A when playing deceitfully.\u003c/p\u003e\u003cp\u003ePart two is determine the best possible score if player A did not look and is honest.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExamples:\u003c/b\u003e\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eA: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\r\n\u003c/pre\u003e\u003cpre class=\"language-matlab\"\u003eA 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\nB 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\nDeceitful A Wins 8\r\nOptimal Honest A Wins 4\r\n\u003c/pre\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e A,B vectors of length N (Small has N\u0026lt;=10, Large(future challenge N\u0026lt;=1000)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Deceitful Wins, Optimal Honest Wins\u003c/p\u003e\u003cp\u003e\u003cb\u003eNote:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error. \u003ca href = \"http://www.go-hero.net/jam/14/solutions/0/4/MATLAB\"\u003eGJam Deceitful Solutions\u003c/a\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.\u003c/p\u003e","function_template":"function W = War(m)\r\n% W=[Deceitful Wins, Optimal Honest Wins]\r\n  W=[0 0];\r\nend","test_suite":"%%\r\nm=[0.270000 0.550000 0.910000 0.330000 0.520000 0.300000 ;0.850000 0.450000 0.060000 0.240000 0.120000 0.880000 ];\r\nWexp=[5 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.164000 0.255000 0.009000 0.445000 0.209000 0.100000 0.391000 0.536000 0.027000 0.118000 ;0.673000 0.782000 0.582000 0.882000 0.591000 0.855000 0.745000 0.955000 0.991000 0.600000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.800000 0.480000 0.760000 0.680000 0.160000 0.640000 0.360000 ;0.200000 0.440000 0.960000 0.280000 0.880000 0.520000 0.120000 ];\r\nWexp=[5 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.170000 0.100000 0.120000 0.200000 0.540000 0.150000 ;0.490000 0.070000 0.240000 0.680000 0.610000 0.340000 ];\r\nWexp=[2 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.780000 0.770000 0.900000 0.810000 0.880000 0.840000 0.600000 0.730000 0.930000 0.990000 ;0.270000 0.150000 0.260000 0.510000 0.570000 0.310000 0.170000 0.140000 0.400000 0.040000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.320000 0.820000 0.350000 0.770000 0.020000 0.550000 0.040000 0.990000 0.610000 0.190000 ;0.730000 0.530000 0.750000 0.800000 0.670000 0.870000 0.330000 0.250000 0.080000 0.680000 ];\r\nWexp=[7 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.510000 0.100000 0.380000 0.050000 0.210000 0.130000 0.440000 0.180000 ;0.560000 0.920000 0.540000 0.900000 0.670000 0.790000 0.820000 0.970000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.420000 ;0.080000 ];\r\nWexp=[1 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.690000 0.310000 0.540000 0.230000 0.710000 0.030000 0.490000 0.600000 0.510000 0.860000 ;0.830000 0.340000 0.370000 0.740000 0.430000 0.200000 0.090000 0.170000 0.910000 0.400000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.300000 0.920000 0.710000 0.130000 0.230000 0.620000 0.140000 0.260000 0.360000 0.310000 ;0.440000 0.010000 0.640000 0.350000 0.820000 0.550000 0.780000 0.790000 0.060000 0.570000 ];\r\nWexp=[6 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.504000 0.218000 0.479000 0.101000 0.050000 0.445000 0.471000 0.084000 0.034000 0.008000 ;0.992000 0.546000 0.647000 0.849000 0.891000 0.739000 0.765000 0.555000 0.613000 0.748000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.570000 0.470000 0.640000 0.550000 0.060000 0.430000 0.040000 0.280000 0.130000 0.510000 ;0.700000 0.740000 0.770000 0.810000 0.870000 0.790000 0.940000 0.910000 0.850000 0.660000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.200000 0.020000 0.510000 0.120000 0.220000 0.250000 0.100000 0.490000 0.530000 0.350000 ;0.800000 0.960000 0.760000 0.820000 0.710000 0.570000 0.940000 0.690000 0.900000 0.550000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.260000 0.030000 0.360000 0.410000 0.330000 0.430000 0.540000 0.300000 0.280000 0.100000 ;0.770000 0.910000 0.700000 0.550000 0.590000 0.780000 0.650000 0.860000 0.750000 0.990000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.920000 0.370000 0.900000 0.200000 0.150000 0.020000 0.530000 0.860000 0.250000 0.190000 ;0.170000 0.980000 0.140000 0.680000 0.830000 0.470000 0.950000 0.340000 0.880000 0.540000 ];\r\nWexp=[7 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.510000 0.020000 0.490000 0.280000 0.080000 0.830000 0.170000 0.140000 0.850000 ;0.420000 0.650000 0.950000 0.890000 0.030000 0.580000 0.380000 0.060000 0.370000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.670000 0.050000 0.590000 0.330000 0.820000 0.030000 0.740000 0.560000 0.950000 0.620000 ;0.210000 0.380000 0.770000 0.080000 0.260000 0.640000 0.460000 0.790000 0.310000 0.410000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.840000 0.800000 0.420000 0.580000 0.670000 0.070000 0.360000 ;0.690000 0.870000 0.310000 0.600000 0.760000 0.200000 0.380000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.450000 0.380000 0.280000 0.590000 0.620000 0.230000 0.810000 ;0.320000 0.190000 0.680000 0.140000 0.090000 0.940000 0.170000 ];\r\nWexp=[6 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.207000 0.288000 0.180000 0.595000 0.748000 0.459000 0.802000 0.387000 0.027000 0.090000 ;0.450000 0.982000 0.694000 0.613000 0.486000 0.423000 0.685000 0.847000 0.432000 0.604000 ];\r\nWexp=[4 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.750000 0.970000 0.820000 0.840000 0.680000 0.780000 0.730000 0.270000 0.220000 0.150000 ;0.130000 0.920000 0.390000 0.320000 0.230000 0.080000 0.800000 0.330000 0.720000 0.590000 ];\r\nWexp=[10 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.260000 0.140000 0.600000 0.950000 0.160000 0.650000 0.580000 0.910000 0.230000 0.020000 ;0.120000 0.510000 0.530000 0.280000 0.350000 0.070000 0.400000 0.930000 0.490000 0.090000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.545000 0.527000 0.500000 0.727000 0.018000 0.400000 0.191000 0.982000 0.409000 0.591000 ;0.945000 0.745000 0.355000 0.673000 0.045000 0.118000 0.682000 0.827000 0.645000 0.482000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.930000 0.980000 0.470000 0.810000 0.830000 0.460000 0.510000 0.540000 ;0.490000 0.640000 0.170000 0.290000 0.140000 0.440000 0.590000 0.760000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.580000 ;0.330000 ];\r\nWexp=[1 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.640000 0.820000 0.700000 0.480000 0.520000 0.610000 0.060000 0.240000 0.300000 ;0.550000 0.450000 0.090000 0.030000 0.850000 0.670000 0.760000 0.360000 0.790000 ];\r\nWexp=[7 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.800000 ;0.900000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.340000 0.100000 0.040000 0.110000 0.650000 0.250000 0.570000 0.480000 0.150000 0.800000 ;0.550000 0.020000 0.920000 0.080000 0.700000 0.360000 0.910000 0.710000 0.820000 0.850000 ];\r\nWexp=[5 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.340000 0.890000 0.060000 0.090000 0.750000 0.730000 0.810000 0.950000 0.660000 0.390000 ;0.530000 0.970000 0.610000 0.670000 0.690000 0.380000 0.590000 0.300000 0.720000 0.110000 ];\r\nWexp=[8 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.870000 0.600000 0.860000 0.830000 0.680000 0.810000 0.700000 0.920000 0.760000 ;0.170000 0.510000 0.330000 0.050000 0.240000 0.030000 0.410000 0.480000 0.520000 ];\r\nWexp=[9 9];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.940000 0.720000 0.810000 0.220000 0.280000 0.530000 0.440000 0.160000 0.880000 0.970000 ;0.120000 0.030000 0.470000 0.560000 0.380000 0.340000 0.690000 0.090000 0.250000 0.750000 ];\r\nWexp=[10 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.410000 0.360000 0.230000 0.140000 0.180000 0.050000 0.500000 0.270000 0.090000 0.450000 ;0.680000 0.950000 0.910000 0.860000 0.730000 0.550000 0.590000 0.820000 0.640000 0.770000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.278000 0.852000 0.370000 0.824000 0.389000 0.704000 0.546000 0.204000 0.296000 0.056000 ;0.833000 0.315000 0.991000 0.028000 0.907000 0.630000 0.361000 0.037000 0.065000 0.954000 ];\r\nWexp=[7 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.713000 0.657000 0.778000 0.435000 0.565000 0.870000 0.963000 0.343000 0.481000 0.593000 ;0.287000 0.333000 0.454000 0.130000 0.370000 0.759000 0.176000 0.611000 0.231000 0.398000 ];\r\nWexp=[10 6];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.590000 0.750000 0.650000 0.900000 0.740000 0.880000 0.850000 ;0.400000 0.070000 0.540000 0.380000 0.570000 0.150000 0.490000 ];\r\nWexp=[7 7];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.110000 0.920000 0.540000 0.840000 0.380000 0.770000 0.900000 0.490000 0.870000 0.750000 ;0.620000 0.480000 0.330000 0.440000 0.890000 0.130000 0.430000 0.080000 0.340000 0.560000 ];\r\nWexp=[10 5];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.480000 0.650000 0.770000 0.690000 0.720000 0.560000 0.660000 0.550000 0.510000 0.730000 ;0.310000 0.440000 0.300000 0.060000 0.200000 0.420000 0.030000 0.070000 0.110000 0.140000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.900000 0.680000 0.600000 0.800000 ;0.350000 0.050000 0.170000 0.880000 ];\r\nWexp=[4 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.730000 0.910000 0.450000 0.640000 0.090000 ;0.550000 0.360000 0.270000 0.820000 0.180000 ];\r\nWexp=[4 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.530000 0.740000 0.410000 0.320000 0.820000 0.970000 0.620000 0.500000 0.710000 0.090000 ;0.180000 0.760000 0.380000 0.150000 0.470000 0.210000 0.560000 0.120000 0.590000 0.440000 ];\r\nWexp=[9 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.487000 0.092000 0.714000 0.160000 0.504000 0.277000 0.479000 0.605000 0.462000 0.832000 ;0.210000 0.824000 0.118000 0.387000 0.664000 0.874000 0.445000 0.739000 0.546000 0.017000 ];\r\nWexp=[8 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.100000 ;0.400000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.688000 0.872000 0.615000 0.477000 0.734000 0.624000 0.394000 0.532000 0.954000 0.817000 ;0.193000 0.119000 0.349000 0.073000 0.037000 0.009000 0.128000 0.303000 0.046000 0.064000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.910000 0.550000 0.300000 0.570000 0.920000 0.400000 0.450000 0.150000 0.110000 0.190000 ;0.090000 0.790000 0.890000 0.740000 0.850000 0.940000 0.340000 0.380000 0.720000 0.260000 ];\r\nWexp=[6 1];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.723000 0.639000 0.824000 0.697000 0.840000 0.882000 0.437000 0.782000 0.588000 0.218000 ;0.345000 0.151000 0.067000 0.849000 0.815000 0.235000 0.521000 0.765000 0.950000 0.681000 ];\r\nWexp=[9 3];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.200000 0.150000 0.350000 0.090000 0.110000 0.330000 0.220000 ;0.390000 0.460000 0.850000 0.700000 0.570000 0.610000 0.500000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.850000 0.790000 0.550000 0.380000 0.300000 0.400000 0.770000 0.740000 0.320000 0.570000 ;0.260000 0.210000 0.110000 0.130000 0.020000 0.040000 0.230000 0.190000 0.090000 0.060000 ];\r\nWexp=[10 10];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.961000 0.330000 0.010000 0.816000 0.583000 0.913000 0.893000 0.951000 0.126000 0.398000 ;0.767000 0.029000 0.262000 0.641000 0.175000 0.544000 0.359000 0.932000 0.680000 0.476000 ];\r\nWexp=[9 4];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.300000 ;0.700000 ];\r\nWexp=[0 0];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\nm=[0.240000 0.050000 0.190000 0.110000 0.920000 0.590000 0.730000 0.380000 0.780000 0.950000 ;0.860000 0.700000 0.430000 0.620000 0.220000 0.540000 0.410000 0.890000 0.680000 0.490000 ];\r\nWexp=[6 2];\r\nW=War(m);\r\nassert(isequal(Wexp,W))\r\n%%\r\n% function GJam_Qual_2014d\r\n% % \r\n% %War\r\n% fn='D-small-attempt0.in';\r\n% %fn='D-large.in';\r\n% [data] = read_file(fn); % \r\n% \r\n% fidG = fopen('D-small-output.out', 'w');\r\n% %fidG = fopen('D-large-output001.out', 'w');\r\n% tic\r\n% \r\n% for i=1:size(data,2) % Cell array has N rows of cases\r\n% % m=sort(data{i},2);\r\n%  m=data{i};\r\n%  dw = dWar(m) ;% \r\n%  w = War(m) ;%  \r\n%  \r\n%    fprintf('Case #%i: %i %i\\n',i,dw,w);\r\n%    fprintf(fidG,'Case #%i: %i %i\\n',i,dw,w);\r\n%     \r\n% end\r\n% toc\r\n% \r\n% fclose(fidG);\r\n% \r\n% end\r\n% \r\n% function dw=dWar(m)\r\n% % Post contest\r\n% % Lie to burn opponent best pieces\r\n%  N=sort(m(1,:));\r\n%  K=sort(m(2,:));\r\n%  \r\n%  dw=0;\r\n%  for i=1:length(N)\r\n%   if N(i)\u003eK(1) % Lie to above to beat lowest\r\n%    dw=dw+1;\r\n%    K=K(2:end);\r\n%   else % Lie to just below best\r\n%    K=K(1:end-1);\r\n%   end\r\n%  end\r\n%  \r\n% end\r\n% \r\n% function w=War(m)\r\n% % Optimal truthful strategy\r\n% % Best lucky sequence\r\n%  w=0;\r\n% \r\n%  Nm=sort(m(1,:));\r\n%  Km=sort(m(2,:));\r\n%  \r\n%  Nmz=[Nm' ones(size(Nm,2),1)];\r\n%  Kmz=[Km' zeros(size(Km,2),1)];\r\n%  z=[Nmz;Kmz]; \r\n%  z=sortrows(z,-1);\r\n%  \r\n%  while ~isempty(z)\r\n%   ptr1=find(z(:,2)==1,1,'last');\r\n%   ptr0=find(z(1:ptr1,2)==0,1,'last');\r\n%   if isempty(ptr0)\r\n%    % score\r\n%    w=w+1;\r\n%    z(ptr1,:)=[];\r\n%    ptr0=find(z(:,2)==0,1,'last');\r\n%    z(ptr0,:)=[];  \r\n%   else\r\n%    z(ptr1,:)=[];\r\n%    z(ptr0,:)=[];  \r\n%   end\r\n%  end \r\n%  % Create worst Ken/B Scenario\r\n%  \r\n% end\r\n% \r\n% \r\n% function [d] = read_file(fn)\r\n% % Read whole array then parse\r\n% % dlmread valid for numeric arrays\r\n%  m=dlmread(fn);\r\n%  m(1,:)=[];\r\n%  for i=1:size(m,1)/3\r\n%   d{i}=m(3*i-1:3*i,1:m(3*i-2,1));\r\n%  end\r\n%  \r\n% end % read_file\r\n% Data Set file\r\n%4\r\n%1\r\n%0.5\r\n%0.6\r\n%2\r\n%0.7 0.2\r\n%0.8 0.3\r\n%3\r\n%0.5 0.1 0.9\r\n%0.6 0.4 0.3\r\n%9\r\n%0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\r\n%0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\r\n\r\n\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-04-19T14:08:56.000Z","updated_at":"2014-04-19T15:00:47.000Z","published_at":"2014-04-19T15:00:47.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis Challenge is derived from\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://code.google.com/codejam/contest/2974486/dashboard#s=p3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam 2014 Qualifier Deceitful War\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eMy condensed summary of the problem statement.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven two players, A and B, they are each given N masses. All masses are unique. Player A plays first on each comparison and states a Mass. Player B then plays a Mass. The player with the higher mass wins a point after they are compared on a scale. These masses then disappear. This repeats for all N masses. There are no constraints on the order of pieces played.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eUnsurprisingly when A truthfully states masses player B consistently wins.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePlayer A, discouraged, decides to cheat. After the masses are provided player A asks B get A a drink and while B is away A looks at B's masses. Player A now plays pieces but does not necessarily honestly state the mass values. All scale comparisons must be valid based on B's strategy and A's stated mass. Player A now achieves more wins.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePart one is determine the best possible score for A when playing deceitfully.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePart two is determine the best possible score if player A did not look and is honest.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExamples:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[A: 0.5 0.1 0.9  B 0.6 0.4 0.3  Deceitful Wins 2, Optimal Honest 1\\n\\nA 0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899\\nB 0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458\\nDeceitful A Wins 8\\nOptimal Honest A Wins 4]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e A,B vectors of length N (Small has N\u0026lt;=10, Large(future challenge N\u0026lt;=1000)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Deceitful Wins, Optimal Honest Wins\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn the contest period there were 30 Matlab solutions, of which I was not one as I glitched on the easy Deceitful algorithm thinking my Honest algorithm was in error.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.go-hero.net/jam/14/solutions/0/4/MATLAB\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGJam Deceitful Solutions\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. My post contest full GJam is in the test suite. About 11000 out of 28000 entrants solved this puzzle.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44718,"title":"Optimize the Tollbooths","description":"Your company has recently built its own highway from which they hope to generate some revenue. The highway has no branches or intersections, it is a simple line segment. Your company also has access to simple data from some potential customers that describe their start and endpoint locations and their budget.\r\n\r\nTollbooths are also located on various locations on the highway. The total toll a customer pays is the sum of all tolls on the tollbooths that lie between their start and end locations. If a customer cannot afford the total toll they must pay, then they simply don't make the trip and end up paying nothing.\r\n\r\nThe customer wants to start or end their destination at the precise location of a tollbooth, so we can represent the problem as follows. We have a graph that is a simple path with N nodes. Each node represents a potential start or end location of a customer and there is a single tollbooth located on each node. So the total toll a customer pays is the sum of the tolls on the nodes they cross to reach their endpoint. Both the start point and end point are also toll booths.\r\n\r\nYour task is to set the tolls on each of the tollbooths to generate the *maximum revenue* for your company. The answer is the pricing of each toll booth.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; transform-origin: 332px 171px; vertical-align: baseline; perspective-origin: 332px 171px; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; transform-origin: 309px 42px; white-space: pre-wrap; perspective-origin: 309px 42px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eYour company has recently built its own highway from which they hope to generate some revenue. The highway has no branches or intersections, it is a simple line segment. Your company also has access to simple data from some potential customers that describe their start and endpoint locations and their budget.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; transform-origin: 309px 42px; white-space: pre-wrap; perspective-origin: 309px 42px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eTollbooths are also located on various locations on the highway. The total toll a customer pays is the sum of all tolls on the tollbooths that lie between their start and end locations. If a customer cannot afford the total toll they must pay, then they simply don't make the trip and end up paying nothing.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; transform-origin: 309px 52.5px; white-space: pre-wrap; perspective-origin: 309px 52.5px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe customer wants to start or end their destination at the precise location of a tollbooth, so we can represent the problem as follows. We have a graph that is a simple path with N nodes. Each node represents a potential start or end location of a customer and there is a single tollbooth located on each node. So the total toll a customer pays is the sum of the tolls on the nodes they cross to reach their endpoint. Both the start point and end point are also toll booths.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; transform-origin: 309px 21px; white-space: pre-wrap; perspective-origin: 309px 21px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eYour task is to set the tolls on each of the tollbooths to generate the\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003emaximum revenue\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; transform-origin: 0px 0px; perspective-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e for your company. The answer is the pricing of each toll booth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = toll_pricing_strategy(option,budget)\r\n   y=zeros(1,size(option,2));\r\n  % Optimize much !\r\nend","test_suite":"%% \r\noption=[1 0; 0 1; 1 1];\r\nbudget=[10;10;10];\r\ny_correct=[10,10];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))\r\n\r\n%%\r\noption = [1 0 0; 0 1 0; 1 1 1];\r\nbudget=[10;10;15];\r\ny_correct=[10,5,0];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))\r\n\r\n%%\r\noption=[0 1 1 0;1 1 1 0;1 0 0 0; 0 0 1 1];\r\nbudget=[15 ;25 ;15; 20];\r\ny_correct=[10,0,15,5];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))\r\n\r\n%%\r\noption=[0   0   0   1   1   1\r\n   0   0   1   1   1   1\r\n   1   1   0   0   0   0\r\n   0   1   1   1   0   0\r\n   1   1   1   1   1   1\r\n   0   1   1   1   1   1];\r\nbudget=[ 42 ;31 ;12 ;63 ;105 ;87];\r\ny_correct=[18,12,20,31,11,13];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))\r\n\r\n%%\r\noption=[1   1   1   1   1   0   0   0\r\n   0   0   0   1   1   1   1  0\r\n   1   1   1   0   0   0   0   0\r\n   0   1   1   1   1   1   0   0\r\n   0   0   1   1   1   1   1   0\r\n   0   1   1   1   1   1   0   0\r\n   1   1   1   0   0   0   0   0\r\n   0   0   0   1   1   1   1   1];\r\nbudget=[25;50;60;120;40;80;20;60];\r\ny_correct=[30,10,20,5,15,30,10,0];\r\ny=toll_pricing_strategy(option,budget);\r\nrevenue=@(x)sum((option*x(:)).*((option*x(:))\u003c=budget));\r\nassert(revenue(y)\u003e=revenue(y_correct))","published":true,"deleted":false,"likes_count":0,"comments_count":6,"created_by":195572,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2,"test_suite_updated_at":"2020-10-03T13:41:47.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-08-04T21:46:46.000Z","updated_at":"2020-10-03T13:41:47.000Z","published_at":"2018-08-04T21:50:10.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour company has recently built its own highway from which they hope to generate some revenue. The highway has no branches or intersections, it is a simple line segment. Your company also has access to simple data from some potential customers that describe their start and endpoint locations and their budget.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTollbooths are also located on various locations on the highway. The total toll a customer pays is the sum of all tolls on the tollbooths that lie between their start and end locations. If a customer cannot afford the total toll they must pay, then they simply don't make the trip and end up paying nothing.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe customer wants to start or end their destination at the precise location of a tollbooth, so we can represent the problem as follows. We have a graph that is a simple path with N nodes. Each node represents a potential start or end location of a customer and there is a single tollbooth located on each node. So the total toll a customer pays is the sum of the tolls on the nodes they cross to reach their endpoint. Both the start point and end point are also toll booths.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYour task is to set the tolls on each of the tollbooths to generate the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003emaximum revenue\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e for your company. The answer is the pricing of each toll booth.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"term":"tag:\"strategy\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"strategy\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"strategy\"","","\"","strategy","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f74df0248a0\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f74df024800\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f74df023400\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f74df024da0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f74df024d00\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f74df024c60\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f74df024940\u003e":"tag:\"strategy\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f74df024940\u003e":"tag:\"strategy\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"search","password":"J3bGPZzQ7asjJcCk","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"strategy\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"strategy\"","","\"","strategy","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f74df0248a0\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f74df024800\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f74df023400\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f74df024da0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f74df024d00\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f74df024c60\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f74df024940\u003e":"tag:\"strategy\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f74df024940\u003e":"tag:\"strategy\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":1246,"difficulty_rating":"easy"},{"id":54715,"difficulty_rating":"easy-medium"},{"id":772,"difficulty_rating":"medium"},{"id":773,"difficulty_rating":"medium"},{"id":821,"difficulty_rating":"medium-hard"},{"id":2291,"difficulty_rating":"unrated"},{"id":44718,"difficulty_rating":"unrated"}]}}