hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Dungeon Master
Goto page 1, 2, 3, 4, 5  Next
 
Reply to topic    hacker.org Forum Index » Challenges View previous topic
View next topic
Dungeon Master
Author Message
Crunch



Joined: 04 Nov 2008
Posts: 1

Post Dungeon Master Reply with quote
Hello all,
I have a question about the challenge Dungeon Master. I would like to automate it but I don't know in which language I should write this script and how.
Thanks for your answers
Crunch Wink
Thu Nov 20, 2008 2:28 pm View user's profile Send private message
tails



Joined: 10 Jun 2008
Posts: 191
Location: Tokyo

Post Reply with quote
Hi,

Recently there was a discussion, on the topic "Programming Challenges.", about what language we should use to solve challenges. I think it's also applicable to the dungeon automation.

In the discussion above,
gfoot strongly recommends Python. adum says he also uses it to create challenges. I recommend it too, although I don't know much about it.
the_impaler and I use perl and C(++). But I don't recommend these two to beginners; perl is somewhat obsolete and C(++) is too primitive.
sigi recommends Ruby. m!nus uses PHP. Allosentient prefers C#.

In conclusion, I think you don't have to be very nervous on which language to use.
Thu Nov 20, 2008 5:52 pm View user's profile Send private message
snibril



Joined: 26 Oct 2008
Posts: 31

Post Reply with quote
I did it with a bash script.
Thu Nov 20, 2008 9:34 pm View user's profile Send private message
sigi



Joined: 26 Oct 2008
Posts: 37

Post Reply with quote
snibril wrote:
I did it with a bash script.

Wow, I'm certainly interested in seeing that.
Fri Nov 21, 2008 1:47 am View user's profile Send private message
sigi



Joined: 26 Oct 2008
Posts: 37

Post Reply with quote
tails wrote:
In conclusion, I think you don't have to be very nervous on which language to use.

Making a dungeon "solver" in Java or C(++) would certainly be a lot more work compared to Python, Perl, Ruby or any other scripting language. This challenge calls for scripting in one of its purest forms, so one is well advised to choose a language targeted at that market (most so called "scripting" languages nowadays are simply very-high-level, interpreted, general purpose languages, but let's stick with the scripting term for the moment).

Anyway: don't use a too low level language for tasks like this.
Fri Nov 21, 2008 1:51 am View user's profile Send private message
simon



Joined: 16 Nov 2008
Posts: 6

Post Reply with quote
My one are 300 ugly and slow Bash lines, too...

If i had any clue that I would add so many features and have to reuse it with another goal (less steps) I would have done it in python or at least had started with a cleaner structure... Embarassed

Fast and painless reusage is something only good code gives you. And you can write awful code in any language Smile

i would post my bot in a "solved -> Cave Master" Thread, but I don't know if this really was the last "dungeon challenge"...
Fri Nov 21, 2008 12:30 pm View user's profile Send private message
Allosentient



Joined: 10 Apr 2008
Posts: 273

Post Reply with quote
simon wrote:

Fast and painless reusage is something only good code gives you. And you can write awful code in any language Smile


That is a big reason why I like to use C#, because it is much easier to write nearly flawless code (some of my older code from 6 months ago looks horrendous though), and the language and debugger is simplified enough so that I can fully control what the program does 100%. If I were going to do a script I would write a simple library first in C# rather than try to do it in python because in the latter case I would not be able to detect every mistake out there.
Fri Nov 21, 2008 4:03 pm View user's profile Send private message
tog



Joined: 14 Nov 2008
Posts: 70
Location: Germany

Post Reply with quote
I have to admit that I have no idea on how to play this dungeon-game in the first place. I understand that I will have to automate this, and this shouldn't be the problem. But I don't understand the rules of this game (never was into MUDs). To me it seems like clicking randomly on the links, monsters keep coming and I always have to fight them. So is this challenge about following a long sequence of random links? Or does this really make sense?
Fri Nov 21, 2008 5:32 pm View user's profile Send private message
simon



Joined: 16 Nov 2008
Posts: 6

Post Reply with quote
Allosentient wrote:

That is a big reason why I like to use C#, because it is much easier to write nearly flawless code (some of my older code from 6 months ago looks horrendous though), and the language and debugger is simplified enough so that I can fully control what the program does 100%. If I were going to do a script I would write a simple library first in C# rather than try to do it in python because in the latter case I would not be able to detect every mistake out there.


jeah... C#... i would rather pee myself in bed, you know...
Fri Nov 21, 2008 5:39 pm View user's profile Send private message
Allosentient



Joined: 10 Apr 2008
Posts: 273

Post Reply with quote
I tend not to credit any linux users when they argue whether a language is better, unless they can provide reasons... Just trying to avoid the "I'm better than you because I don't believe in capitalism" argument.

I tried linux for years, tried many different versions, and concluded that it doesn't live up to the hype.

Worried about giving money to microsoft? How many windows users here have actually paid for their copy of windows without getting a free copy from someone else?

Worried about paying $300? If you make $30 an hour at your job and you save just ten hours of troubleshooting with linux (and believe me, you will), you've already broken even.

Just a couple of cheap arguments there why I think windows is more practical, save the ideologies for the philosophers.

The only thing I can think of that you can't do with windows that you can do with linux (when dealing with non-server applications) is use the programs that are already there, but the library dependencies, spaghetti C code, and license compatibility rules are horrendous.

They do have some fun games though, gotta admit.
Fri Nov 21, 2008 5:54 pm View user's profile Send private message
simon



Joined: 16 Nov 2008
Posts: 6

Post Reply with quote
bla bla... What has this to do with anything? You can write python and C# on both plattforms... And I never said that I want to, or you should change your operating system... Actually I never mentioned my OS... And the last thing I want to have is a discussion about that (do you know how many hours of my life I spended on these discussions? mostly drunk?! it's not funny anymore......).

go back to your highly paid $30/hour developer job and I keep on doing my thing...
Fri Nov 21, 2008 7:18 pm View user's profile Send private message
wrtlprnft



Joined: 09 Nov 2008
Posts: 28

Post Reply with quote
Actually I think the ideal language to do this is this javascript Smile Opera and Firefox have User JS/Greasemonkey, you don't have to figure out how to handle authentication and cookies and whatnot, the html is already parsed for you and you don't need extra code to show intermediate results Smile

My script currently is at Dungeon Level 31, I hope this doesn't take much longer Surprised
or maybe staying ten levels ahead of the dungeon level isn't such a practical idea
Fri Nov 21, 2008 7:26 pm View user's profile Send private message
simon



Joined: 16 Nov 2008
Posts: 6

Post Reply with quote
wrtlprnft wrote:
Actually I think the ideal language to do this is this javascript...


First I wanted to write another pee comment, but you brought interesting points. For some rapid solutions (like requested by a few of these challenges) this sounds handy.
no, but the simplest nethack convention works just fine
Fri Nov 21, 2008 7:41 pm View user's profile Send private message
Allosentient



Joined: 10 Apr 2008
Posts: 273

Post Reply with quote
simon wrote:
bla bla... What has this to do with anything? You can write python and C# on both plattforms... And I never said that I want to, or you should change your operating system... Actually I never mentioned my OS... And the last thing I want to have is a discussion about that (do you know how many hours of my life I spended on these discussions? mostly drunk?! it's not funny anymore......).

go back to your highly paid $30/hour developer job and I keep on doing my thing...


What is so bad about C#, then?
Fri Nov 21, 2008 8:15 pm View user's profile Send private message
wrtlprnft



Joined: 09 Nov 2008
Posts: 28

Post Reply with quote
I finally got it… and the depth of this dungeon is waaay over the top… but then again my AI was pretty dumb, too.
Fri Nov 21, 2008 10:00 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Challenges All times are GMT
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.