{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-06T14:01:22.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":"2026-04-06T00: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":1257,"title":"PONG 001: Player  vs Wall, 4 Lives, Interactive download","description":"Variation of the Original Classic PONG game brought to Cody.\r\n\r\nAttempt to keep the ball alive against a Wall. The ball speeds up on every hit. When it is missed it restarts at a new location. The start locations and sequences are purely deterministic. Movement of the paddle are max up/down steps of -1 to 1 (effective delta 50) or no move. Partial paddle moves allowed.\r\n\r\nPaddle center is provided and paddle covers +/- 50 units.\r\nThe field is square at 1000 by 1000 with 3 walls and the lower left corner being (0,0)\r\n\r\nTo aid in development of your routine, a PONG_Interactive_001a.m file that creates a solver script and video has been posted at \u003chttps://sites.google.com/site/razapor/matlab_cody/PONG_Interactive_001a.m PONG_Interactive_001a.m\u003e. (Right click, 'save link as'). The routine creates a PONG_001_solver.m script from the interactive play. The script demonstrates Interactivity, figure/KeyPressFcn, listdlg, and VideoWriter.\r\n\r\n\r\n\u003chttps://sites.google.com/site/razapor/matlab_cody/PONG_001_video_63_185.mp4 PONG Interactive 63 Returns\u003e (MP4)\r\n\r\n\r\n\r\n*Inputs:* (paddle,ball)  \r\n \r\n   paddle = 500 ; Paddle Center on the Y-axis, Paddle is +/- 50 from center\r\n   ball=[500 500 40 60]; % x y vx vy  Posiiton and Velocity, Treated as a Point\r\n\r\n*Output:* Direction\r\n\r\n   1 Up, -1 is Down, 0-No move\r\n   Paddle moves 50*direction, half paddle step. abs(direction)\u003c=1 is allowed\r\n\r\n*Pass Criteria:* 10 hits, a score of 450 or better\r\n\r\n*Scoring:* 100 - 5 * Hits + 100 * Lives,  (500 - 5 * hits  for \u003c 100 hits)\r\n\r\n*Game Theory:* Position Paddle to minimize travel to next location. Vx=1.1*Vx and Vy=1.05*Vy after every return.\r\n\r\n*Near Future:* Paddle vs Paddle (Mirror). Followed by Angle varation based on Paddle/Ball Position","description_html":"\u003cp\u003eVariation of the Original Classic PONG game brought to Cody.\u003c/p\u003e\u003cp\u003eAttempt to keep the ball alive against a Wall. The ball speeds up on every hit. When it is missed it restarts at a new location. The start locations and sequences are purely deterministic. Movement of the paddle are max up/down steps of -1 to 1 (effective delta 50) or no move. Partial paddle moves allowed.\u003c/p\u003e\u003cp\u003ePaddle center is provided and paddle covers +/- 50 units.\r\nThe field is square at 1000 by 1000 with 3 walls and the lower left corner being (0,0)\u003c/p\u003e\u003cp\u003eTo aid in development of your routine, a PONG_Interactive_001a.m file that creates a solver script and video has been posted at \u003ca href=\"https://sites.google.com/site/razapor/matlab_cody/PONG_Interactive_001a.m\"\u003ePONG_Interactive_001a.m\u003c/a\u003e. (Right click, 'save link as'). The routine creates a PONG_001_solver.m script from the interactive play. The script demonstrates Interactivity, figure/KeyPressFcn, listdlg, and VideoWriter.\u003c/p\u003e\u003cp\u003e\u003ca href=\"https://sites.google.com/site/razapor/matlab_cody/PONG_001_video_63_185.mp4\"\u003ePONG Interactive 63 Returns\u003c/a\u003e (MP4)\u003c/p\u003e\u003cp\u003e\u003cb\u003eInputs:\u003c/b\u003e (paddle,ball)\u003c/p\u003e\u003cpre\u003e   paddle = 500 ; Paddle Center on the Y-axis, Paddle is +/- 50 from center\r\n   ball=[500 500 40 60]; % x y vx vy  Posiiton and Velocity, Treated as a Point\u003c/pre\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Direction\u003c/p\u003e\u003cpre\u003e   1 Up, -1 is Down, 0-No move\r\n   Paddle moves 50*direction, half paddle step. abs(direction)\u0026lt;=1 is allowed\u003c/pre\u003e\u003cp\u003e\u003cb\u003ePass Criteria:\u003c/b\u003e 10 hits, a score of 450 or better\u003c/p\u003e\u003cp\u003e\u003cb\u003eScoring:\u003c/b\u003e 100 - 5 * Hits + 100 * Lives,  (500 - 5 * hits  for \u0026lt; 100 hits)\u003c/p\u003e\u003cp\u003e\u003cb\u003eGame Theory:\u003c/b\u003e Position Paddle to minimize travel to next location. Vx=1.1*Vx and Vy=1.05*Vy after every return.\u003c/p\u003e\u003cp\u003e\u003cb\u003eNear Future:\u003c/b\u003e Paddle vs Paddle (Mirror). Followed by Angle varation based on Paddle/Ball Position\u003c/p\u003e","function_template":"function pdir = PONG_001_solver(paddle,ball)\r\n %  paddle=500; % position y % min max paddle [50 950]\r\n %  ball=[500 500 40 60]; % x y vx vy  Treated as a Point\r\n %\r\n % Output Paddle movement : pdir range [-1 1]\r\n %\r\n % Paddle Size is +/- 50 from paddle value\r\n % Predict ball location and move to within +/- 50\r\n % or Load PONG_001_solver.m from Interactive Play with file create\r\n \r\npdir = randi([-1 1]);\r\n \r\n \r\n","test_suite":"%%\r\nfeval(@assignin,'caller','score',500);\r\n\r\n pwidth=50; % Total size +/- 50 for 101 Paddle\r\n bwidth=10; % Radius of ball\r\n\r\n vup=10; % Sub-sampling ball movements for Interactive\r\n spfx=1.10; % Speed increase factor\r\n spfy=1.05; % to Avoid fixed Paddle solution\r\n negVmax=-200;\r\n posVmax=210;\r\n mov_step=50; % Paddle Quantized Movement  (1/2 Paddle)\r\n maxLives=4;\r\n maxHits=100;\r\n\r\n% Initial Start\r\n paddle=500; % position y % min max paddle [50 950]\r\n ball=[500 500 40 60]; % x y vx vy  Treated as a Point\r\n\r\nlives=0; % Lives\r\nhits=0;\r\nentry=0;\r\n\r\nwhile lives\u003cmaxLives \u0026\u0026 hits\u003cmaxHits\r\n\r\n [curdir]=PONG_001_solver(paddle,ball); % FUNCTION CALL\r\n\r\n if abs(curdir)\u003e1,curdir=0;end % Max 1 / -1 allowed\r\n curmov=mov_step*curdir;\r\n\r\n if entry==0\r\n  curdirvec=curdir;\r\n  entry=1;\r\n else\r\n  curdirvec=[curdirvec curdir]; % Saving moves for file create\r\n end\r\n\r\n% Paddle Move\r\n paddle=max(pwidth,min(1000-pwidth,paddle+curmov)); % [50 : 950] limits\r\n\r\n% Ball Move : Hopefully I got the Mirror solutions right\r\n\r\n  for j=1:vup\r\n    % ball=[500 500 1 1]; % x y vx vy  Treated as a Point\r\n\r\n    if ball(1)+ball(3)/vup\u003c=0 % Check if Point is Over\r\n\r\n    % Find x=0 crossing and check if paddle is within\r\n    % [paddle-pwidth-bwidth,paddle+pwidth+bwidth] pwidth=50; \r\n    % set speed scalar\r\n    \r\n      xc=ball(2)-ball(1)*ball(4)/ball(3);\r\n      if xc\u003e=1000\r\n       xc=1000-(xc-1000);\r\n      else\r\n       xc=abs(xc);\r\n      end\r\n      \r\n      paddlemax= paddle+pwidth+bwidth;\r\n      paddlemin= paddle-pwidth-bwidth;\r\n      \r\n      if xc\u003epaddlemax || xc\u003cpaddlemin % Swing and a Miss\r\n       lives=lives+1;\r\n       fprintf('Oops %i\\n',lives);\r\n       \r\n       if lives\u003e=maxLives,break;end\r\n       % draw ball\r\n       %paddle=500; % position y % min max paddle [50 950]\r\n\r\n       % Reset Ball Keep deterministic but different\r\n       ball=[500-100*lives 500 40+11*lives 35-3*lives];\r\n\r\n       break;\r\n      end\r\n      \r\n      \r\n      % Ball returned\r\n      hits=hits+1;\r\n      ball(1:2)=ball(1:2)+ball(3:4)/vup;\r\n      \r\n      ball(1)=-ball(1);\r\n      ball(3)=-spfx*ball(3);\r\n      \r\n      if ball(2)\u003c0\r\n       ball(2)=-ball(2);\r\n       ball(4)=-spfy*ball(4);\r\n      elseif ball(2)\u003e1000\r\n       ball(2)=2000-ball(2);\r\n       ball(4)=-spfy*ball(4);\r\n      else\r\n       ball(4)=spfy*ball(4);\r\n      end\r\n      \r\n      ball(3)=max(negVmax,min(posVmax,ball(3)));\r\n      ball(4)=max(negVmax,min(posVmax,ball(4)));\r\n      \r\n    else % Wall bounces\r\n     ball(1:2)=ball(1:2)+ball(3:4)/vup;\r\n     \r\n     if ball(1)\u003e=1000 % To the right\r\n      ball(1)=1000-(ball(1)-1000);\r\n      ball(3)=-ball(3);\r\n      if ball(2)\u003e=1000 % TR\r\n       ball(2)=1000-(ball(2)-1000);\r\n       ball(4)=-ball(4);\r\n      elseif ball(2)\u003c=0 % BR\r\n       ball(2)=-ball(2); % abs\r\n       ball(4)=-ball(4);\r\n      end\r\n     else % Middle\r\n      if ball(2)\u003e=1000 % TM\r\n       ball(2)=1000-(ball(2)-1000);\r\n       ball(4)=-ball(4);\r\n      elseif ball(2)\u003c=0 % BM\r\n       ball(2)=-ball(2); % abs\r\n       ball(4)=-ball(4);\r\n      end\r\n     end\r\n    \r\n     \r\n    end % Ball Pass / New Position\r\n\r\n  end % j vup\r\n\r\n\r\nend % while Alive and Hits \u003c Total Success\r\n\r\n%fprintf('%i ',curdirvec);fprintf('\\n'); % Moves\r\nfprintf('Hits %i\\n',hits)\r\nfprintf('Lives %i\\n',lives)\r\nscore= max(0,maxHits-5*hits+100*lives); % \r\n \r\nfprintf('Score %i\\n',score)\r\n% Passing Score is 10 hits to Score 450 or Less\r\n\r\nassert(score\u003c=450,sprintf('Score %i\\n',score))\r\n\r\n\r\nfeval( @assignin,'caller','score',floor(min( 500,score )) );","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":16,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":33,"created_at":"2013-02-10T05:51:19.000Z","updated_at":"2026-02-07T15:54:36.000Z","published_at":"2013-02-10T06:57:18.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\u003eVariation of the Original Classic PONG 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\u003eAttempt to keep the ball alive against a Wall. The ball speeds up on every hit. When it is missed it restarts at a new location. The start locations and sequences are purely deterministic. Movement of the paddle are max up/down steps of -1 to 1 (effective delta 50) or no move. Partial paddle moves allowed.\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\u003ePaddle center is provided and paddle covers +/- 50 units. The field is square at 1000 by 1000 with 3 walls and the lower left corner being (0,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\u003eTo aid in development of your routine, a PONG_Interactive_001a.m file that creates a solver script and 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/PONG_Interactive_001a.m\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePONG_Interactive_001a.m\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. (Right click, 'save link as'). The routine creates a PONG_001_solver.m script from the interactive play. The script demonstrates Interactivity, figure/KeyPressFcn, listdlg, and VideoWriter.\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/PONG_001_video_63_185.mp4\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePONG Interactive 63 Returns\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (MP4)\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 (paddle,ball)\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[   paddle = 500 ; Paddle Center on the Y-axis, Paddle is +/- 50 from center\\n   ball=[500 500 40 60]; % x y vx vy  Posiiton and Velocity, Treated as a Point]]\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\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e 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[   1 Up, -1 is Down, 0-No move\\n   Paddle moves 50*direction, half paddle step. abs(direction)\u003c=1 is allowed]]\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\u003ePass Criteria:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e 10 hits, a score of 450 or better\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\u003cw:r\u003e\u003cw:t\u003e 100 - 5 * Hits + 100 * Lives, (500 - 5 * hits for \u0026lt; 100 hits)\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\u003eGame Theory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Position Paddle to minimize travel to next location. Vx=1.1*Vx and Vy=1.05*Vy after every return.\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\u003eNear Future:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Paddle vs Paddle (Mirror). Followed by Angle varation based on Paddle/Ball Position\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\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":1257,"title":"PONG 001: Player  vs Wall, 4 Lives, Interactive download","description":"Variation of the Original Classic PONG game brought to Cody.\r\n\r\nAttempt to keep the ball alive against a Wall. The ball speeds up on every hit. When it is missed it restarts at a new location. The start locations and sequences are purely deterministic. Movement of the paddle are max up/down steps of -1 to 1 (effective delta 50) or no move. Partial paddle moves allowed.\r\n\r\nPaddle center is provided and paddle covers +/- 50 units.\r\nThe field is square at 1000 by 1000 with 3 walls and the lower left corner being (0,0)\r\n\r\nTo aid in development of your routine, a PONG_Interactive_001a.m file that creates a solver script and video has been posted at \u003chttps://sites.google.com/site/razapor/matlab_cody/PONG_Interactive_001a.m PONG_Interactive_001a.m\u003e. (Right click, 'save link as'). The routine creates a PONG_001_solver.m script from the interactive play. The script demonstrates Interactivity, figure/KeyPressFcn, listdlg, and VideoWriter.\r\n\r\n\r\n\u003chttps://sites.google.com/site/razapor/matlab_cody/PONG_001_video_63_185.mp4 PONG Interactive 63 Returns\u003e (MP4)\r\n\r\n\r\n\r\n*Inputs:* (paddle,ball)  \r\n \r\n   paddle = 500 ; Paddle Center on the Y-axis, Paddle is +/- 50 from center\r\n   ball=[500 500 40 60]; % x y vx vy  Posiiton and Velocity, Treated as a Point\r\n\r\n*Output:* Direction\r\n\r\n   1 Up, -1 is Down, 0-No move\r\n   Paddle moves 50*direction, half paddle step. abs(direction)\u003c=1 is allowed\r\n\r\n*Pass Criteria:* 10 hits, a score of 450 or better\r\n\r\n*Scoring:* 100 - 5 * Hits + 100 * Lives,  (500 - 5 * hits  for \u003c 100 hits)\r\n\r\n*Game Theory:* Position Paddle to minimize travel to next location. Vx=1.1*Vx and Vy=1.05*Vy after every return.\r\n\r\n*Near Future:* Paddle vs Paddle (Mirror). Followed by Angle varation based on Paddle/Ball Position","description_html":"\u003cp\u003eVariation of the Original Classic PONG game brought to Cody.\u003c/p\u003e\u003cp\u003eAttempt to keep the ball alive against a Wall. The ball speeds up on every hit. When it is missed it restarts at a new location. The start locations and sequences are purely deterministic. Movement of the paddle are max up/down steps of -1 to 1 (effective delta 50) or no move. Partial paddle moves allowed.\u003c/p\u003e\u003cp\u003ePaddle center is provided and paddle covers +/- 50 units.\r\nThe field is square at 1000 by 1000 with 3 walls and the lower left corner being (0,0)\u003c/p\u003e\u003cp\u003eTo aid in development of your routine, a PONG_Interactive_001a.m file that creates a solver script and video has been posted at \u003ca href=\"https://sites.google.com/site/razapor/matlab_cody/PONG_Interactive_001a.m\"\u003ePONG_Interactive_001a.m\u003c/a\u003e. (Right click, 'save link as'). The routine creates a PONG_001_solver.m script from the interactive play. The script demonstrates Interactivity, figure/KeyPressFcn, listdlg, and VideoWriter.\u003c/p\u003e\u003cp\u003e\u003ca href=\"https://sites.google.com/site/razapor/matlab_cody/PONG_001_video_63_185.mp4\"\u003ePONG Interactive 63 Returns\u003c/a\u003e (MP4)\u003c/p\u003e\u003cp\u003e\u003cb\u003eInputs:\u003c/b\u003e (paddle,ball)\u003c/p\u003e\u003cpre\u003e   paddle = 500 ; Paddle Center on the Y-axis, Paddle is +/- 50 from center\r\n   ball=[500 500 40 60]; % x y vx vy  Posiiton and Velocity, Treated as a Point\u003c/pre\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e Direction\u003c/p\u003e\u003cpre\u003e   1 Up, -1 is Down, 0-No move\r\n   Paddle moves 50*direction, half paddle step. abs(direction)\u0026lt;=1 is allowed\u003c/pre\u003e\u003cp\u003e\u003cb\u003ePass Criteria:\u003c/b\u003e 10 hits, a score of 450 or better\u003c/p\u003e\u003cp\u003e\u003cb\u003eScoring:\u003c/b\u003e 100 - 5 * Hits + 100 * Lives,  (500 - 5 * hits  for \u0026lt; 100 hits)\u003c/p\u003e\u003cp\u003e\u003cb\u003eGame Theory:\u003c/b\u003e Position Paddle to minimize travel to next location. Vx=1.1*Vx and Vy=1.05*Vy after every return.\u003c/p\u003e\u003cp\u003e\u003cb\u003eNear Future:\u003c/b\u003e Paddle vs Paddle (Mirror). Followed by Angle varation based on Paddle/Ball Position\u003c/p\u003e","function_template":"function pdir = PONG_001_solver(paddle,ball)\r\n %  paddle=500; % position y % min max paddle [50 950]\r\n %  ball=[500 500 40 60]; % x y vx vy  Treated as a Point\r\n %\r\n % Output Paddle movement : pdir range [-1 1]\r\n %\r\n % Paddle Size is +/- 50 from paddle value\r\n % Predict ball location and move to within +/- 50\r\n % or Load PONG_001_solver.m from Interactive Play with file create\r\n \r\npdir = randi([-1 1]);\r\n \r\n \r\n","test_suite":"%%\r\nfeval(@assignin,'caller','score',500);\r\n\r\n pwidth=50; % Total size +/- 50 for 101 Paddle\r\n bwidth=10; % Radius of ball\r\n\r\n vup=10; % Sub-sampling ball movements for Interactive\r\n spfx=1.10; % Speed increase factor\r\n spfy=1.05; % to Avoid fixed Paddle solution\r\n negVmax=-200;\r\n posVmax=210;\r\n mov_step=50; % Paddle Quantized Movement  (1/2 Paddle)\r\n maxLives=4;\r\n maxHits=100;\r\n\r\n% Initial Start\r\n paddle=500; % position y % min max paddle [50 950]\r\n ball=[500 500 40 60]; % x y vx vy  Treated as a Point\r\n\r\nlives=0; % Lives\r\nhits=0;\r\nentry=0;\r\n\r\nwhile lives\u003cmaxLives \u0026\u0026 hits\u003cmaxHits\r\n\r\n [curdir]=PONG_001_solver(paddle,ball); % FUNCTION CALL\r\n\r\n if abs(curdir)\u003e1,curdir=0;end % Max 1 / -1 allowed\r\n curmov=mov_step*curdir;\r\n\r\n if entry==0\r\n  curdirvec=curdir;\r\n  entry=1;\r\n else\r\n  curdirvec=[curdirvec curdir]; % Saving moves for file create\r\n end\r\n\r\n% Paddle Move\r\n paddle=max(pwidth,min(1000-pwidth,paddle+curmov)); % [50 : 950] limits\r\n\r\n% Ball Move : Hopefully I got the Mirror solutions right\r\n\r\n  for j=1:vup\r\n    % ball=[500 500 1 1]; % x y vx vy  Treated as a Point\r\n\r\n    if ball(1)+ball(3)/vup\u003c=0 % Check if Point is Over\r\n\r\n    % Find x=0 crossing and check if paddle is within\r\n    % [paddle-pwidth-bwidth,paddle+pwidth+bwidth] pwidth=50; \r\n    % set speed scalar\r\n    \r\n      xc=ball(2)-ball(1)*ball(4)/ball(3);\r\n      if xc\u003e=1000\r\n       xc=1000-(xc-1000);\r\n      else\r\n       xc=abs(xc);\r\n      end\r\n      \r\n      paddlemax= paddle+pwidth+bwidth;\r\n      paddlemin= paddle-pwidth-bwidth;\r\n      \r\n      if xc\u003epaddlemax || xc\u003cpaddlemin % Swing and a Miss\r\n       lives=lives+1;\r\n       fprintf('Oops %i\\n',lives);\r\n       \r\n       if lives\u003e=maxLives,break;end\r\n       % draw ball\r\n       %paddle=500; % position y % min max paddle [50 950]\r\n\r\n       % Reset Ball Keep deterministic but different\r\n       ball=[500-100*lives 500 40+11*lives 35-3*lives];\r\n\r\n       break;\r\n      end\r\n      \r\n      \r\n      % Ball returned\r\n      hits=hits+1;\r\n      ball(1:2)=ball(1:2)+ball(3:4)/vup;\r\n      \r\n      ball(1)=-ball(1);\r\n      ball(3)=-spfx*ball(3);\r\n      \r\n      if ball(2)\u003c0\r\n       ball(2)=-ball(2);\r\n       ball(4)=-spfy*ball(4);\r\n      elseif ball(2)\u003e1000\r\n       ball(2)=2000-ball(2);\r\n       ball(4)=-spfy*ball(4);\r\n      else\r\n       ball(4)=spfy*ball(4);\r\n      end\r\n      \r\n      ball(3)=max(negVmax,min(posVmax,ball(3)));\r\n      ball(4)=max(negVmax,min(posVmax,ball(4)));\r\n      \r\n    else % Wall bounces\r\n     ball(1:2)=ball(1:2)+ball(3:4)/vup;\r\n     \r\n     if ball(1)\u003e=1000 % To the right\r\n      ball(1)=1000-(ball(1)-1000);\r\n      ball(3)=-ball(3);\r\n      if ball(2)\u003e=1000 % TR\r\n       ball(2)=1000-(ball(2)-1000);\r\n       ball(4)=-ball(4);\r\n      elseif ball(2)\u003c=0 % BR\r\n       ball(2)=-ball(2); % abs\r\n       ball(4)=-ball(4);\r\n      end\r\n     else % Middle\r\n      if ball(2)\u003e=1000 % TM\r\n       ball(2)=1000-(ball(2)-1000);\r\n       ball(4)=-ball(4);\r\n      elseif ball(2)\u003c=0 % BM\r\n       ball(2)=-ball(2); % abs\r\n       ball(4)=-ball(4);\r\n      end\r\n     end\r\n    \r\n     \r\n    end % Ball Pass / New Position\r\n\r\n  end % j vup\r\n\r\n\r\nend % while Alive and Hits \u003c Total Success\r\n\r\n%fprintf('%i ',curdirvec);fprintf('\\n'); % Moves\r\nfprintf('Hits %i\\n',hits)\r\nfprintf('Lives %i\\n',lives)\r\nscore= max(0,maxHits-5*hits+100*lives); % \r\n \r\nfprintf('Score %i\\n',score)\r\n% Passing Score is 10 hits to Score 450 or Less\r\n\r\nassert(score\u003c=450,sprintf('Score %i\\n',score))\r\n\r\n\r\nfeval( @assignin,'caller','score',floor(min( 500,score )) );","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":16,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":33,"created_at":"2013-02-10T05:51:19.000Z","updated_at":"2026-02-07T15:54:36.000Z","published_at":"2013-02-10T06:57:18.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\u003eVariation of the Original Classic PONG 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\u003eAttempt to keep the ball alive against a Wall. The ball speeds up on every hit. When it is missed it restarts at a new location. The start locations and sequences are purely deterministic. Movement of the paddle are max up/down steps of -1 to 1 (effective delta 50) or no move. Partial paddle moves allowed.\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\u003ePaddle center is provided and paddle covers +/- 50 units. The field is square at 1000 by 1000 with 3 walls and the lower left corner being (0,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\u003eTo aid in development of your routine, a PONG_Interactive_001a.m file that creates a solver script and 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/PONG_Interactive_001a.m\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePONG_Interactive_001a.m\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. (Right click, 'save link as'). The routine creates a PONG_001_solver.m script from the interactive play. The script demonstrates Interactivity, figure/KeyPressFcn, listdlg, and VideoWriter.\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/PONG_001_video_63_185.mp4\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePONG Interactive 63 Returns\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (MP4)\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 (paddle,ball)\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[   paddle = 500 ; Paddle Center on the Y-axis, Paddle is +/- 50 from center\\n   ball=[500 500 40 60]; % x y vx vy  Posiiton and Velocity, Treated as a Point]]\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\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e 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[   1 Up, -1 is Down, 0-No move\\n   Paddle moves 50*direction, half paddle step. abs(direction)\u003c=1 is allowed]]\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\u003ePass Criteria:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e 10 hits, a score of 450 or better\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\u003cw:r\u003e\u003cw:t\u003e 100 - 5 * Hits + 100 * Lives, (500 - 5 * hits for \u0026lt; 100 hits)\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\u003eGame Theory:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Position Paddle to minimize travel to next location. Vx=1.1*Vx and Vy=1.05*Vy after every return.\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\u003eNear Future:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e Paddle vs Paddle (Mirror). Followed by Angle varation based on Paddle/Ball Position\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\"}]}"}],"term":"tag:\"Trajectory\"","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:\"Trajectory\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"Trajectory\"","","\"","Trajectory","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f636e20a340\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f636e20a2a0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f636e2099e0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f636e20a5c0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f636e20a520\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f636e20a480\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f636e20a3e0\u003e":"tag:\"Trajectory\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f636e20a3e0\u003e":"tag:\"Trajectory\""},"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":"cody-search","password":"78X075ddcV44","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:\"Trajectory\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"Trajectory\"","","\"","Trajectory","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f636e20a340\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f636e20a2a0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f636e2099e0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f636e20a5c0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f636e20a520\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f636e20a480\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f636e20a3e0\u003e":"tag:\"Trajectory\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f636e20a3e0\u003e":"tag:\"Trajectory\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":1257,"difficulty_rating":"medium"}]}}