&
- Advertise Here with Today.com
 

Feb 03 2010

CROBOTS Tournament

Published by impomatic under Programming Edit This

Maurizio Camangi recently announced the CROBOTS 2010 Tournament. CROBOTS is a programming game invented by Tom Poindexter which will celebrate it’s 25th birthday later this year.

The idea of CROBOTS is to program the controller for a battle robot using a subset of the C programming language. The robots attempt to destroy their opponents in either a 1-on-1 battle or a 4 robot mêlée. For more information about the rules, check the tournament home page.

Possibly-related Articles:                                        (auto-generated)
- Advertise Here with Today.com

No responses yet

Jan 14 2010

512 Byte Bootsector Contest

Published by impomatic under Programming, assembly Edit This

I’m thinking about taking part in the 512 Byte Bootsector Contest being organised by Quok on the OSDev.org forum.

The idea of the contest is to write a bootsector that works on FAT12 and FAT16 media. The bootsector should load and execute a 32 bit ELF file called OSLOADER. It doesn’t sound too tricky, so take a look at the requirements if you’d like to take part :-)

Possibly-related Articles:                                        (auto-generated)

No responses yet

Jan 09 2010

Upgraded to Windows 7, DOSBox to the Rescue

Published by impomatic under Misc Edit This

I’ve been forced to buy a new computer recently which came with Windows 7 installed. While it looks prettier than XP, I’ve come across a few problems.

The biggest issue I’ve discovered is the lack of support for 16 bit software. Luckily I found DOSBox, an x86 emulator with DOS. While DOSBox is adequate for running a few of my old utilities, I’ve noticed a marked decrease in speed when trying to run anything demanding.

How would you suggest running 16 bit apps with Window’s 7?

Possibly-related Articles:                                        (auto-generated)

No responses yet

Nov 17 2009

Son of Darts Programming Contest

Published by impomatic under Programming Edit This

I’m taking part in Al Zimmermann’s latest programming contest, Son of Darts. The idea of the contest is to select values for the regions on a dartboard. The aim is for a number of darts to make as many consecutive values as possible.

For example with 6 darts and two regions with values 1 and 5, it’s possible to make any value from 1 to 18, but not 19.

Being a lazy programmer, I’ve coded a dumb brute force attack rather than taking the time to come up with a fancy algorithm. So far I’ve found the optimal solution for 1 to 6 regions and I’m reached rank 130 in the standings!

Here’s the program I’m using, written in BASIC. Unfortunately it’s incredibly slow :-( Can you see any obvious improvements?:

10 regions=3
20 high=0
30 dim r(regions+1)
40 max=5000
50 dim s(max)

60 for a=1 to regions+1
70 r(a)=a-1
80 next a

90 for a=1 to max
100 s(a)=0
110 next a

120 for c=1 to regions+1
130 for d=c to regions+1
140 for e=d to regions+1
150 for f=e to regions+1
160 for g=f to regions+1
170 for h=g to regions+1
180 s(r(c)+r(d)+r(e)+r(f)+r(g)+r(h))=1
190 next h
200 next g
210 next f
220 next e
230 next d
240 next c

250 best=0
260 best=best+1
270 if s(best)=1 and best<max then goto 260
280 if best<high then goto 350

290 high=best
300 print best,
310 for a=2 to regions+1
320 print r(a);
330 next a
340 print

350 ptr=regions+1
360 r(ptr)=r(ptr)+1
370 if r(ptr)>best then goto 390
380 if r(ptr)<1000 then goto 90
390 r(ptr)=r(ptr-1)+2
400 ptr=ptr-1
410 if ptr<>2 then goto 360
420 stop
Possibly-related Articles:                                        (auto-generated)

One response so far

Sep 26 2009

Songs in Code

Published by impomatic under Programming Edit This

#songsincode is a trend which started on Twitter a few weeks ago. The idea is to express the title or lyrics of a song as a computer program. Here’s an example by Roy van Rijn:

    for(Leaf leaf:leafs)
    {leaf.setColor(new Color(139,69,19));}
    sky.setColor(Color.GRAY);

This is California Dreamin’ by the Mamas and Papas, “All the leaves are brown and the sky is gray”. If #songsincode is of interest, here are some of the best collections I’ve found:

Possibly-related Articles:                                        (auto-generated)

No responses yet

Next »

- Advertise Here
Some Today.com contributors may have received a fee or a promotional product or service from a manufacturer for promotional consideration, while others receive no consideration at all. Each contributor is responsible for disclosing any such promotional consideration.