Page 2 of 2

Posted: Sat Feb 13, 2010 5:47 pm
by CodeX
if looking at it as it is doesn't work anymore, try looking for underlying patterns which you can use to solve it

found the approach!

Posted: Mon Feb 15, 2010 10:00 am
by laz0r
It's ok, I worked it out! :D

I think that everyone who is above level 500 must have used the same approach.... and it didn't get noticlably slower either! (though simply writing those massive grids to the screen took a while!)

writing software

Posted: Thu Apr 15, 2010 5:11 am
by outboundglitch
to me writing software is a pain, the programming language i use is BATCH, thats how bad i am at programming, i suck at it, :oops: but i did make a batch file with login page, remote connection shutdown along with notepad, pop up maker, folder factory, it didn't take long. :P but thats the best i can do, anyone have any tips for me on writing software, or choosing the most easiest one? plz and thank you.

Posted: Thu Apr 15, 2010 1:37 pm
by Karian
If you want to do some more programming, the easiest way is just to pick a language and play around with it. Take something that suits you, and find a tutorial for it online. People can discuss for days which is the best language to take, but for learning how to program, it is more or less the same. Once you know how to program, it is not that hard anymore to learn a new language.

Posted: Fri Apr 16, 2010 3:21 am
by outboundglitch
wow, thank you for the info. ill look around right now. :D

Posted: Mon May 17, 2010 10:46 am
by Masti6
gfoot wrote:It's pretty easy in most modern languages. e.g. in Python 2:

Code: Select all

import urllib
pagedata = urllib.urlopen("http://www.hacker.org").read().splitlines()
That should give you an array of lines.

In Python 3 it's been moved around a bit - I think you need:

Code: Select all

import urllib.request
pagedata = urllib.request.urlopen("http://www.hacker.org").read().splitlines()
But I don't have Python 3 installed, so I can't check it for sure.

Once you've got the data you'll have to parse it to extract useful things like the board size and contents, then write the fun bit of your code that figures out a good route.

It's actually probably better to do the fun bit first, though, so you can make test boards locally without having to wait for web requests from time to time. All my hacker.org solvers support this, and cache any downloads locally as well so I can replay them later - it's good to have some smaller boards available when you're profiling an algorithm and want faster results.
data = urllib.urlopen("http://www.hacker.org").read().splitlines()
AttributeError: 'module' object has no attribute 'urlopen'
and
import urllib.request
ImportError: No module named request
Python Version 2.6.5
Why ain't it working :(
Could you try to post a working code for getting data, and to read it, to use it, ... etc.
It would be good if you sent a copy of the file you used for the "Dungeon Master" so I could see what kind of approach I should take. I do not feel like asking for straight answers, but as I have no idea, and the tutorials out there ain't telling me the working answer either, could you?
Megafile works just fine, or paste the Python code in Pastebin.com and send me a link.
P.S.
Pretty please?

Posted: Mon May 24, 2010 6:08 pm
by nighthalk
heres a C# implimentation its for crossflip but its easy to modify for any of them, i obviously edited out stuff to make sure you get practice. i only provided necisary parts for the web interaction. technically i also changed the username password to be seperate strings im not entirly sure if it lets you build a static string dynamicly but i wanted it obvious you were suposed to put something there.

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
namespace crossflipsolver
{
    class Program
    {
        static string username="yourusername"
        static string password="yourpassword"
        static string baseurl = "http://www.hacker.org/cross/?name="+username+"&      password="+password
        static void Main(string[] args)
        {
            HttpWebRequest myrequest = (HttpWebRequest)WebRequest.Create(baseurl);
            myrequest.Method = "GET";
            WebResponse myresponse = myrequest.GetResponse();
            StreamReader sr = new StreamReader(myresponse.GetResponseStream(), System.Text.Encoding.UTF8);
            string result = sr.ReadToEnd();
            puzzle = parseweb(result);
        }
        static string parseweb(string input) {
            //put your parsing code here, 
        }
    }
}
i also have a c++ implimentation but it spans like 12 files because i downloaded a library to do it for me... you may find one that may work at

http://www.cplusplus.com/src/

how to become a hacker

Posted: Sun Jul 28, 2013 6:17 am
by Wooshee
MerickOWA wrote:Learn how to write a program? pick your favorite language java,c,c++,c#,ruby,python,lisp and learn how to download webpages in that language, and parse out of the html the maze data.

After that, you have to figure out how you want to solve the problem. The simplest method (but the longest) is to just search through all possible answers until you find an answer that solves the problem. (try each instruction length, and each combination of down(s) and right(s) until your robot makes it to the edge).

However, I don't think you'll get to level 513 with that method. You can either work on ways of speeding up your searching techniques and/or simplifying the problem so there are fewer possibilities to search.


Hi what book should i Begin with in order i can become a hacker please?

Re: how to become a hacker

Posted: Sun Jul 28, 2013 2:17 pm
by Wooshee
Wooshee wrote:
MerickOWA wrote:Learn how to write a program? pick your favorite language java,c,c++,c#,ruby,python,lisp and learn how to download webpages in that language, and parse out of the html the maze data.

After that, you have to figure out how you want to solve the problem. The simplest method (but the longest) is to just search through all possible answers until you find an answer that solves the problem. (try each instruction length, and each combination of down(s) and right(s) until your robot makes it to the edge).

However, I don't think you'll get to level 513 with that method. You can either work on ways of speeding up your searching techniques and/or simplifying the problem so there are fewer possibilities to search.


Hi what book should i Begin with in order i can become a hacker please?
thanks for u help and how i can get these programming languages?

Posted: Thu Aug 08, 2013 8:23 pm
by Lilchen
thanks for u help and how i can get these programming languages?
Perhaps, i'm unfriendly.. But

Try out:
http://lmgtfy.com/?q=java+for+beginners

or:

http://lmgtfy.com/?q=python+for+beginners


greetings

Posted: Fri Mar 04, 2022 3:39 pm
by ervinjason
You're not supposed to solve all levels by hand...

it's virtually impossible.

For level 100 and up, you're expected to use a computer to solve this puzzle using a program that you write.

Learn how to write a program?

pick your favorite language java,c,c++,c#,ruby,python,lisp and learn how to download webpages in that language, and parse out of the html the maze data.

After that, you have to figure out how you want to solve the problem.

The simplest method (but the longest) is to just search through all possible answers until you find an answer that solves the problem. (try each instruction length, and each combination of down(s) and right(s) until your robot makes it to the edge).

However, I don't think you'll get to level 513 with that method.

You can either work on ways of speeding up your searching techniques and/or simplifying the problem so there are fewer possibilities to search.

Good luck.