[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - Hello and question(s)!

It is currently Fri Jul 20, 2018 6:58 am Advanced search

Hello and question(s)!

New members are welcomed here to introduce themselves, meet your opponents here.
This is a place for website/account issues too.

Hello and question(s)!

Postby cjohnweb » Tue Nov 01, 2011 2:15 am

Hello!

My name is John. I've done procedural PHP and MySQL for around 10 years now. I have many many other hobbies but PHP is more of a love than anything else. I heard about Ants from my cousin, I thought it sounded fun because I've often pondered making my own games and such. This, though not nearly as complicated as programming an entire game from the ground up, still sounded like a load of fun.

So I've installed Python and downloaded the start up PHP code but I ran into a problem: I don't do OOP. It's actually more of a preference than anything, but to date there isn't anything I can't do with Procedural PHP. I understand OOP's functionality, I understand it's uses, I understand how is can be better than Procedural code, but I found it frustrating. After 5 or 6 attempts at learning OOP I decided that it wasn't worth it because I had other projects that were waiting on me that could not wait any longer.

Can I still program my ant procedurally, or an I limited to OOP?

I looked at the relatively short start up bot code but I find it inadequate in many ways. Almost nothing is commented, so I don't know what is going on and where minus a few obvious things. After 1 week of learning PHP figured out pretty fast that comments are necessary, for yourself or for others to look at your code. I would find it much easier to at least follow along the sample code if it said "//here is where your ant moves and here is how it works" or something so I knew what was going on. After uploading the code to the server and watching the game that took place, the 2 ants that spawned simply went in a straight line and stopped at the first wall / water / whatever obstacle. This shows me that the code provided works, but I didn't learn anything from it. Mostly because I don't know OOP very well so I'm a little lost, but with comments I could have figured something out.

I didn't see this in the rules very clearly - I know you can't write files, etc. But for AI to be true AI it needs to be able to "learn" and to learn it needs to save data from previous experiences. What methods are allowed to save data from each turn? Maybe it's provided at the end of each game as a txt file or something I can parse?

Does someone have a start up file that I can base my ant bot off of that is commented or explains each line of code to help me get started?

Thanks for the help, hope it's not too much trouble.
cjohnweb
Cadet
 
Posts: 1
Joined: Tue Nov 01, 2011 1:50 am

Re: Hello and question(s)!

Postby BearOff » Tue Nov 01, 2011 9:29 am

BearOff
Colonel
 
Posts: 67
Joined: Fri Oct 21, 2011 9:59 am


Return to Introductions

Who is online

Users browsing this forum: No registered users and 2 guests

cron