1. NewbieBot
- Posted by Hawke <mdeland at NWINFO.NET> Nov 09, 1998
- 420 views
"Bown, John" wrote: > PS : To send plain-text, to Shroud or to Bind ? > One of the best things about this Bot idea is that beginners to Euphoria > can join in; it could well be the first program they write ( even if > they do crib from other Bot code ). I think that we should make the Bot > code ( and Arena program ) totally open to scrutiny so it's useful as > demonstration code and examples of Euphoria coding. i agree wholeheartedly. Irv posted this idea as a *learning* exercise for newbies. now the idea wasn't 'fresh' as we've talked about botwars before, but this session of botwars is different... i keep thinking, as i see these posts, that as a teaching tool, it's gotten out of hand, by a very very large factor... i propose the following, to UN-derail this beast: discussions of botwars within this listserv, henceforth, should be limited to irv's newcomer challenge, with all code thusly freely and openly donated, including AI algorithms. furthermore, these bots do not 'fight' (compete yes, fight no). it's far too complex for a teaching tool to implement armor, weapons, blah blahblah... on the other hand, there is indeed what appears to be a community of euphorians that are interested in botwars, replete with bells and whistles. let's use the webpages and perhaps one of those freebie forum web page plugin's for the 'real' botwars... i would think that for the teaching aspect, limiting it to maze solving algorithms, which would need the ability to detect a wall or another bot, which would require a sensor mechanism, would be more than enough to teach with. any more than that, and the code that would be shared would be far too bloated and cumbersome, especially since the code would be required to be well commented... any more than this and the listserv will drown in byte transfers... naturally, i'm not asking for all traffic about the real botwars to cease and desist entirely, after all, if the webpage is updated to reflect a new algorithm or API, or API specification, that should assuredly posted... things like that... i know that if i was a newbie, walking in for the first time into the listserv, i'd be overwhelmed with all this... i'd still be at the stage of: well how do i know what color is on the screen where i'm looking/standing? why doesn't my bot move? it just sits there. what's a pixel? why doesn't read_pixel work? (cuz ya fergot to include it) what's an include? i've written this routine that makes the bot go through the maze, but it runs over other bots, instead of running _around_ them. why? I'm checking the result of my sensor and it always shows me farther by one unit than I really am to a wall/other bot. why? (because it starts at the position you're standing on, and it's an *inclusive* count) you get the idea... :) i propose that we rename the discussion, as originally posted by irv, to "newbiebot", no degrading intended. and we confine posts within that discussion to the following bot description: given a random complexity maze, which will have other bots racing you to the goal, and a sensor that will cost you 1 turn for each square you sense away from your location, whose maximum range is 10 squares in any single direction, and a bot that can move one square per turn, rotate to any facing position in one turn (by setting the direction you want it to face directly), and can only remember it's last ten steps, (it's ridiculous to think a rat in a maze has more long term memory than that, and it's equally ridiculous to think, in terms of small maze following robots, and their construction, of the on board memory being much more than a few thousand bytes, including operating bios), create a routine that can pilot the ratbot through given maze. directions are simply North,South,East,West, no need for diagonals... that should produce, imo, a code framework of enough complexity to show off many, _many_, features of euphoria, and it's elegance, while keeping the complexity and resultant code to be discussed on the listserv at a manageable level. naturally, i am more than open to fine tuning this, and also open to criticism of this proposal. i always, at the very least, _try_ not to talk down to those that don't know something... so if this *is* too simple for someone just learning euphoria (or even coding at all), please do not take this suggestion as an assault on your intelligence. > This means that we must use plain-text files ( arena.ex, pixelbot.e ) > and of course, add lots of useful comments for newbies to see what we > are actually doing. right... not only comments, but *meaningful* (screw the typing, if you can't type 5 or 6 letter variable names, check out mavis beacon (sp) :P ) variable names, and *meaningful* function/procedure names, choosen to not only reflect what you are doing, but that makes the program read as much as natural english as possible. range = 3 --will cost me three turns to look, 3 to move dir = North --let's look north of my position --let's see which way we can go... if AnotherBotInRange(range,dir,pos) or WallInRange(range,dir,pos) then --apparently, not that way :( BadDirList = BadDirList & dir --mark that one, no go dir = ChooseAnotherDir(BadDirList) --go elsewhere? MoveCount = MoveCount + range --cost for sensor else MoveCount = MoveCount + range --cost for the sensor BotFacing = TurnBot(dir) --make bot face a clear direction MoveCount = MoveCount + 1 --turning is one 'step' pos = MoveBot(BotFacing,range) --go there... MoveCount = MoveCount + range --cost for moving end if return {pos, MoveCount} --let referee know what i'm doing now, this is poor code in that there should be a while loop (perhaps) examining all the potential directions... but i'm just trying to show what i mean by 'meaningful' > Even if a Bot does [ subversively rather than advertised ] try and take > a peek inside the Arena code to 'cheat'; someone will notice this and > I'm sure that someone will cry foul on the mailing list. Naming And > Shaming should be the ideal deterrant. *snicker* comments? i'm open, but flameproof :P (i've got my fire retardant jammies on) --Hawke'
2. Re: NewbieBot
- Posted by C & K L <candkNOSPAM2ME at TICNET.COM> Nov 09, 1998
- 402 views
Wrackin' my brain about how to get a pixel through a maze, I finally tripped over the following (this is an outline for people wanting to make a bot get through a maze): 1. set initial position 2. seek a wall 3. follow that wall until you find the finish zone The bot I created can move all 8 directions and can follow all straight and diagonal walls. The challenge in the future is when the "finish zone" is NOT touching a wall (although my bot can handle this already) and when a particular wall is not part of the exterior border of the maze... Happy codin'! --ck Hawke wrote: > "Bown, John" wrote: > > PS : To send plain-text, to Shroud or to Bind ? > > One of the best things about this Bot idea is that beginners to Euphoria > > can join in; it could well be the first program they write ( even if > > they do crib from other Bot code ). I think that we should make the Bot > > code ( and Arena program ) totally open to scrutiny so it's useful as > > demonstration code and examples of Euphoria coding. > i agree wholeheartedly. > Irv posted this idea as a *learning* exercise for newbies. > now the idea wasn't 'fresh' as we've talked about botwars before, > but this session of botwars is different... > > i keep thinking, as i see these posts, that as a teaching tool, > it's gotten out of hand, by a very very large factor... > i propose the following, to UN-derail this beast: > > discussions of botwars within this listserv, henceforth, > should be limited to irv's newcomer challenge, with all > code thusly freely and openly donated, including AI > algorithms. > furthermore, these bots do not 'fight' (compete yes, fight no). > it's far too complex for a teaching tool to implement > armor, weapons, blah blahblah... > > on the other hand, there is indeed what appears to be a > community of euphorians that are interested in botwars, > replete with bells and whistles. > let's use the webpages and perhaps one of those freebie > forum web page plugin's for the 'real' botwars... > > i would think that for the teaching aspect, limiting it > to maze solving algorithms, which would need the ability > to detect a wall or another bot, which would require > a sensor mechanism, would be more than enough to teach > with. any more than that, and the code that would > be shared would be far too bloated and cumbersome, > especially since the code would be required to be > well commented... any more than this and the listserv > will drown in byte transfers... > > naturally, i'm not asking for all traffic about the > real botwars to cease and desist entirely, after all, > if the webpage is updated to reflect a new algorithm > or API, or API specification, that should assuredly > posted... things like that... > > i know that if i was a newbie, walking in for the first > time into the listserv, i'd be overwhelmed with all > this... i'd still be at the stage of: > well how do i know what color is on the screen > where i'm looking/standing? > why doesn't my bot move? it just sits there. > what's a pixel? > why doesn't read_pixel work? (cuz ya fergot to include it) > what's an include? > i've written this routine that makes the bot go > through the maze, but it runs over other bots, > instead of running _around_ them. why? > I'm checking the result of my sensor and it always > shows me farther by one unit than I really am to > a wall/other bot. why? (because it starts at > the position you're standing on, and it's an > *inclusive* count) > you get the idea... :) > > i propose that we rename the discussion, as originally > posted by irv, to "newbiebot", no degrading intended. > and we confine posts within that discussion to the > following bot description: > given a random complexity maze, which will have > other bots racing you to the goal, and a sensor > that will cost you 1 turn for each square you > sense away from your location, whose maximum range > is 10 squares in any single direction, and a bot > that can move one square per turn, rotate > to any facing position in one turn (by setting > the direction you want it to face directly), > and can only remember it's last ten steps, > (it's ridiculous to think a rat in a maze has > more long term memory than that, and it's equally > ridiculous to think, in terms of small maze > following robots, and their construction, of > the on board memory being much more than a few > thousand bytes, including operating bios), > create a routine that can pilot the ratbot > through given maze. > directions are simply North,South,East,West, > no need for diagonals... > > that should produce, imo, a code framework of > enough complexity to show off many, _many_, features > of euphoria, and it's elegance, while keeping > the complexity and resultant code to be discussed > on the listserv at a manageable level. > > naturally, i am more than open to fine tuning this, > and also open to criticism of this proposal. > > i always, at the very least, _try_ not to talk > down to those that don't know something... > so if this *is* too simple for someone just learning > euphoria (or even coding at all), please do not > take this suggestion as an assault on your intelligence. > > > This means that we must use plain-text files ( arena.ex, pixelbot.e ) > > and of course, add lots of useful comments for newbies to see what we > > are actually doing. > right... not only comments, but *meaningful* (screw the typing, > if you can't type 5 or 6 letter variable names, check out > mavis beacon (sp) :P ) variable names, and *meaningful* > function/procedure names, choosen to not only reflect what > you are doing, but that makes the program > read as much as natural english as possible. > > range = 3 --will cost me three turns to look, 3 to move > dir = North --let's look north of my position > --let's see which way we can go... > if AnotherBotInRange(range,dir,pos) or > WallInRange(range,dir,pos) then > --apparently, not that way :( > BadDirList = BadDirList & dir --mark that one, no go > dir = ChooseAnotherDir(BadDirList) --go elsewhere? > MoveCount = MoveCount + range --cost for sensor > else > MoveCount = MoveCount + range --cost for the sensor > BotFacing = TurnBot(dir) --make bot face a clear direction > MoveCount = MoveCount + 1 --turning is one 'step' > pos = MoveBot(BotFacing,range) --go there... > MoveCount = MoveCount + range --cost for moving > end if > return {pos, MoveCount} --let referee know what i'm doing > > now, this is poor code in that there should be a while loop > (perhaps) examining all the potential directions... but > i'm just trying to show what i mean by 'meaningful' > > > Even if a Bot does [ subversively rather than advertised ] try and take > > a peek inside the Arena code to 'cheat'; someone will notice this and > > I'm sure that someone will cry foul on the mailing list. Naming And > > Shaming should be the ideal deterrant. > *snicker* > > comments? i'm open, but flameproof :P > (i've got my fire retardant jammies on) > > --Hawke'