| | C$ - Code Only
|
|
Here's a quick look at the interface for a code-only C$ game. 1) There must be some method to tell you code if it's going first or second. 2) When it's your turn, calculate a move, then send an IR message which indicates the column number (1-7) of (...) (21 years ago, 2-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) I can see a few soloutions: 1 on board UI. run prg slot 1 or 2 depending on who goes first. for OTHER os's then you can have an ON BOARD UI, press view, or prg. to start. 2. beam a "message" to each brick. 1 or 2. 3. put a touch sensor on each (...) (21 years ago, 2-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) <snip> (...) Chris, Feel free to post v1.1. It is just pomakis code with no changes. Kevin (21 years ago, 2-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) This is recommended. (...) Yes. Standard Mindstorms IR messages. (0-255) (...) Yes, You can skip this step. But then it won't work. This is the protocol. (...) Yes, You can skip this step. But then it won't work. This is the protocol. (...) (...) (21 years ago, 2-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Yeah, is there a crash course page on sending standard IR messages from brickOS? Anyways, I've posted my logic. It takes about 6-7 seconds to make the decisions on a brick (with the sensor polling decreased -- see an old robotics.rcx.legos (...) (21 years ago, 3-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) #include <sys/lnp.h> // I think ... send_msg(move+1); // number from 1-7 ... if (lnp_rcx_message>0) { move = lnp_rcx_message; clear_msg(); } (21 years ago, 3-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Steve, First things first, I have one program for player 0, and a second program for player 1. I cannot play both games with the same program. I'm sure you'll figure out why. There is no real need for steps 3 or 5 (steps 4 and 6 provide the (...) (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) So, does that mean (if you were using a robot) you would have to switch RCXs between games, depending on if you went first or second? :) (...) That's true. But, given the UI that I have set-up in MY RCX, it is required. Just send back the move (...) (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) That is one way to solve it. A second way is to have a total of 3 RCX's. One for running the LEGO hardware, and one for each program. You turn off the one you don't want to use depending on if you go first or second. Have you figured out *why* (...) (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Still trying to get a clear answer to a simple question..... Are you saying that *any* message is fine for step 3? When you say "send back the move number" are you meaning the move we just received, or the move we rapidly predict with our 1750 (...) (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Kevin, your doing JUST FINE. any time you want to join us for an rtl event, you are more than welcome. Chris There's no 'I' in 'team'. There's four in 'platitude-quoting idiot'. (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) yes. I can think of two valid reasons. :) (...) right. You don't have to play, if you don't want to. :) :) Send back the move you just received. Or any random number between 1 and 6. (...) Yes. Currently, your code has a +100. Change that to (...) (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Care to elucidate? (...) Already done. I changed the -200 to 1 also. (...) Ummmmm, you are *not* Chris.... Right? I mean I've never seen the two of you in the same place. Kevin (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Steve, can I have a few days to do some testing? I'm not sure when you want to run the contest. Kevin (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) no. I got fired last time I did that at work. (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Not that I'm Chris but go! :) Back to lurkin' n' smirkin'... (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Kevin, I really didn't plan on having a "contest". Sorry if I misled you. I know several people have code, and they wanted to know how it stacks up against other people's code. I'm just trying to set-up a format in which they can do that. So (...) (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Folks who read rtlToronto can skip this part. I added it because I'm cross posting to robotics.rcx. For those who don't know, rtlToronto had a contest with robots playing Connect Four. Creating a robot for this is double faceted. Getting (...) (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto, lugnet.robotics.rcx)
|
|
| | Re: C$ - Code Only
|
|
(...) Steve, I'm obviously curious to undestand what all you packed into your code. Kevin (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Steve, I'm obviously curious to undestand what all you packed into your code. Kevin (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Steve, One of the thing I noticed when working on the book generation code, there are typically multiple unique drop sequences that get you to the same board state, even when just picking the best hypothetical moves. In an RCX environment that (...) (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Steve, One of the thing I noticed when working on the book generation code, there are typically multiple unique drop sequences that get you to the same board state, even when just picking the best hypothetical moves. In an RCX environment that (...) (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) Forgive a clueless question here, but is QuiteC different than NotQuiteC? If so where can I learn more about it? Thanks! The oldest mention of the term "QuiteC" I could find on LUGNET was only 3 weeks ago but MAYBE I'm searching wrong? see (...) (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto, lugnet.robotics.rcx, lugnet.robotics.rcx.nqc)
|
|
| | Re: C$ - Code Only
|
|
(...) NQC compiles not quite C code into LEGO firmware opcodes. You download the .rcx result, and LEGO firmware interprets the program. This makes it slow. QuiteC and brickOS both use H8 native C compilers that spit out H8 assembly code directly. (...) (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto, lugnet.robotics.rcx, lugnet.robotics.rcx.nqc)
|
|
| | Re: C$ - Code Only
|
|
(...) I think most people seriously underestimated how hard building the robot would be. The funny thing is, all of rtlToronto's events have the same general premise: Build a robot that does something. Second, if you can make the robot do it well, (...) (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto, lugnet.robotics.rcx)
|
|
| | Re: C$ - Code Only
|
|
(...) yes, it was all about the ~game~ within the C$ game. I really wanted to scare you with that bit of info at the last min. (...) you must be SO PROUD of yourself. :) Chris "I stole an opening book off the web." S.H. (21 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto)
|
|
| | Re: C$ - Code Only
|
|
(...) I am admittedly biased toward BrickOS; however, I am wondering if you attempted to free some memory in BrickOS by disabling features that you didn't need? If you are only going to run one program (whether single threaded or multi), you can (...) (21 years ago, 7-Feb-04, to lugnet.org.ca.rtltoronto, lugnet.robotics.rcx, lugnet.robotics.rcx.nqc)
|
|
| | Re: C$ - Code Only
|
|
(...) Nope. I knew there was a certain amount configurability in brickOS, but I assumed it would be hard to get it down to a minumum. (...) With librcx, I started out with the minimum and added only what I needed. (...) Kevin (21 years ago, 12-Feb-04, to lugnet.org.ca.rtltoronto, lugnet.robotics.rcx, lugnet.robotics.rcx.nqc)
|