Added: 3 years ago
From: AVANROTCIV
Views: 9,257
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (41)

Sign In or Sign Up now to post a comment!
  • i'm stuck with checker board and wonder which method to use. Also when i use method for(int i=0;i<4;i++){putBeeper();move(­);if(frontIsBlocked()){turnLef­t();}if(frontIsClear()){move()­;}}}} it works for the world 8x8 but in 6x5 my Karel went up 2 steps. Just wonder that u can help me

  • @606huyen606 Its better not to use any ints in this program. Just do if and while statements, and logically solve them in your head before typing out random code :D

  • I am a high school student doing CS106A Stanford University. And I am stuck on Karel trying to get the checkerboard and I can't get it to do it properly. Could you tell me the method you used?

    Thanks

  • I dont know the requirements, but isnt seeking the middle easy as this; int width; int stepsback; if(!infrontWall) {  width++; move(); } else { widht--; stepsback=width/2; walk(stepsback); } public void walk(int stepsback) { for(int i = 0; i < stepsback; i++) { move(); } }
  • @Frietjestoof can't use variables

  • I just finished solving all the assignments, so I decided I'd go on youtube and checkout how other people solved the problems. It's good to see that you solved them, but they seem kind of unorganized. I'm not sure how you did the midpoint and checkerboard problems! Your Karel seems to take the long route on things :P. Interesting nonetheless!

  • @GioV45 I did it so it works without having to go up and down

  • @AVANROTCIV Oh, well my Karel simply fills the first row with beepers then picks ups up the beepers at each end until he picks up the last beeper, moves one space forward, one space back, and then places a beeper down again

  • @GioV45 that's definitely faster!

  • Whats your algorithm? I can't figure out the checker board one....

  • for the 4th problem Karel has to end up standing in the midpoint with the beeper. That's a condition you didn't fulfill.

  • song name please? lol

  • @LinkySolutions Acid Boys Acid Girlst by Todos Santos

  • in the checkers examples, what if you have some beepers already present? can you do something? btw the last one was good...

  • @ecal80 yes I could do something, but since the problem stated the board was blank i didn't take into considerantion beepers already present. I shouldn't be too difficult to modify it though.

  • there is better way to find out centre of world.

  • @Dixtosa I'm sure! this is just the algorithm I came up with. one thing to notice here is that I did it so karel can find the center even if the world has only one row.

  • Are you on Mehran Sahami's lessons? Hes an awesome teacher

  • @glempa5 no I just did everything from the internet. I'm not even a Stanford student. but I agree he seems to be a really good teacher.

  • Hey can u help me on programming karel to find an exit which is located with a wall missing. My program is that Karel is enclosed in a wall baracade but he needs to get out and there will be only one exit and i want karel to find it please can u help wat should I do. I know u have to use loops but how do i do it? I am using Ready to Program Java

  • i downloaded JRE and eclipse from stanford website

    when i press the editor it does not open up

    also

    Karel is not at all working in it when i opened some java project and wrote code for it

  • @dhanedhar did you watched the videos from stanford? they explain everything there...it should be easy to get started.

  • code > github.com/victornava/stanford­-karel

  • can you give me checker painter code?

  • @Dixtosa i just figured it out

  • Hey, great solutions- I was working on the checkerboard problem and have been tearing my head out trying to make the solution as easy as possible. Could you possibly send me your source code? Im just using this for my own knowledge... So its not like I have to hand the assignment in!! It looks like what you did though was just check to see if there was a beeperPresent the square below and if not put one above and alternate the beepers... The only prob I had was making him stop!

  • Simply annoying video. Wonder who had given five stars?

  • Hey, man. Nice work. What is the music by the way?

  • FIESTA FIESTA FIESTA! lmao awesome :]

  • I wonder if karel could be programmed to solve the Nqueens problem :). Probably it can... :)

  • @jnoort

    Done :)... It's on my channel in case you are interested...

  • @jnoort did u reply to ur self?

  • You send this assignment to they? I'm doing the free classes too, It will be nice if they look at it x]

  • Good job!

    My 'CheckerBoardKarel' program had a slight problem: it put a last undesired extra beeper. Good to see how you handled that.

    But for the 'MidpointFindingKarel' program, I think there was an easier way.

  • Post the video of your MidpointFindingKarel! I wanted to do it so karel didn't need to go up.

  • @AVANROTCIV

    Hey, I like your solution for the midpointfinding!! At first I thought it looked weird, but knowing you didn't want to go up, it's a good solution. I just programmed it myself, I did it by making a diagonal line of beepers, basically.

    Anyways, tnx for sharing!

  • hey, I accidentally deleted your last comment, sorry. Cool that you find another solution, post some videos!

  • did you use variables? cause if you did that's cheating!

  • Were you responding to my comment about solving the midpoint problem without using any beepers? No that doesn't require variables... And I know that would be considered cheating, I watched the lectures ;).

  • yes, I wonder how you did it then since karel doesn't have memory?

  • shit, I just removed another of your comments, I keep hittin the remove button instead of the reply...

    Anyway I just saw your video: briliant!

  • @lemondededemainTV My checkerBoardKarel has this problem too! If it is pair board, it does fine. But when i run with an even board karel don't work so good

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more