Page 3 of 4 <1234>
Topic Options
#191512 - 2008-12-30 09:41 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
oh, I'm working on something alright...

I wanted to post some other (intermediate) solutions, but you didn't give me any time ;\)

 Code:
Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_if.KIX

Computer
OS               = Windows Vista Business Edition
CPU              = Intel Pentium Model 15
Speed            = 2194 MHz
Memory           = 2038 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Instruens Fabulam
Processing Start = 2008/12/30 21:39:41.499
Processing End   = 2008/12/30 21:39:41.530
Duration         = 0000/00/00 00:00:00.031
KiXGolf Score    = 401

Thank you for participating in KiXtart Golf!


 Code:
; begin KiXgolfUDF
;
;!
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $o, $r, $t[($d^)-1],$x

	$ = @crlf
	
	
	For $k = 0 to 1
		$c='@' + join($t,'-') + '@'
		$r = $c + $
		$x = '|' + join($t,'+') + '|' + $
		For each $i in split($l,$)
			For $j = 0 to ($d^)-1
				$ = ' ' + split($i,'&')[$j] + ' '
				$p = $t[$j]
				while ($p^)<($^)
					$p = $p + '-'
				Loop
				while ($p^)>($^)
					$o = substr($d,$j+1,1)
					$ = iif($o='>',' ' + $,iif($o='=',right(' '+$+' ',($p^)),$+' '))
				Loop
				$t[$j] = $p
				$r = $r + '|' + $
			Next
			$ = @crlf
			
			$r = $r + '|'+$ + $x
			$x = @
			$cif = $r + $c
EndFunction
;!
;!
; end KiXgolfUDF
_________________________
The Code is out there

Top
#191513 - 2008-12-30 10:10 PM Re: KiXgolf: Instruens Fabulam - public round [Re: DrillSergeant]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I do have something other too...
just can't nail it, why it fails one of the tests...
_________________________
!

download KiXnet

Top
#191514 - 2008-12-30 10:12 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and I see your code kinda makes mine useless...
_________________________
!

download KiXnet

Top
#191515 - 2008-12-30 10:19 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and I WAS WRONG.
lol...
kinda dirty but works.

397

did I say something about IIF???

 Code:
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x

	$ = @crlf
	
	
	For $k = 0 to 1
		$c='@' + join($t,'-') + '@'
		$r = $c + $
		$x = '|' + join($t,'+') + '|' + $
		For each $i in split($l,$)
			For $j = 0 to ($d^)-1
				$ = split($i,'&')[$j]
				$p = $t[$j]
				while ($p^)<($^)+2
					$p = $p + '-'
				Loop
				while ($p^)>($^)+2
					$ = substr(' ' + $ + ' ',1+(($^) mod 2)),' ' + $,$ + ' '
					$ = $[instr("><",substr($d,$j+1,1))]
				Loop
				$t[$j] = $p
				$r = $r + '| ' + $ + ' '
			Next
			$ = @crlf
			
			$r = $r + '|'+$ + $x
			$x = @
			$cif = $r + $c
EndFunction
_________________________
!

download KiXnet

Top
#191516 - 2008-12-30 10:28 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
just wonder where richie boy went.

and where is hobie with his weird perl logic...
_________________________
!

download KiXnet

Top
#191518 - 2008-12-30 10:31 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
LOL! Was that your christmas present to me?
 Code:
Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_if.KIX

Computer
OS               = Windows Vista Business Editi
CPU              = Intel Pentium Model 15
Speed            = 2194 MHz
Memory           = 2038 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Instruens Fabulam
Processing Start = 2008/12/30 22:30:29.365
Processing End   = 2008/12/30 22:30:29.412
Duration         = 0000/00/00 00:00:00.046
KiXGolf Score    = 388

Thank you for participating in KiXtart Golf!


 Code:
; begin KiXgolfUDF
;
;!
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x

	$ = @crlf
	
	
	For $k = 0 to 1
		$c='@' + join($t,'-') + '@'
		$r = $c + $
		$x = '|' + join($t,'+') + '|' + $
		For each $i in split($l,$)
			For $j = 0 to ($d^)-1
				$ = ' ' + split($i,'&')[$j] + ' '
				$p = $t[$j]
				while ($p^)<($^)
					$p = $p + '-'
				Loop
				while ($p^)>($^)
					$ = right(' '+$+' ',($p^)),' ' + $,$ + ' '
					$ = $[instr("><",substr($d,$j+1,1))]
				Loop
				$t[$j] = $p
				$r = $r + '|' + $ 
			Next
			$ = @crlf
			
			$r = $r + '|'+$ + $x
			$x = @
			$cif = $r + $c
EndFunction

;!
;!
; end KiXgolfUDF
_________________________
The Code is out there

Top
#191519 - 2008-12-30 10:35 PM Re: KiXgolf: Instruens Fabulam - public round [Re: DrillSergeant]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
grr...

looks that way.
but dude, I broke the 400 line.
give me some credit ;\)
_________________________
!

download KiXnet

Top
#191520 - 2008-12-30 10:36 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and, I said it was dirty.
the score was 370 with the single failing test, so I bet we can do something still with it...
_________________________
!

download KiXnet

Top
#191521 - 2008-12-30 10:40 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
I'll give you that your remark about the iif statement is 100% true.

No matter how logical they seem at the (private) time, they're always gone at the end of the public round.
_________________________
The Code is out there

Top
#191522 - 2008-12-30 10:42 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
385
 Code:
; begin KiXgolfUDF
;
;!
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x

	
	
	For $k = 0 to 1
		$ = @crlf
		$c='@' + join($t,'-') + '@'
		$r = $c + $
		$x = '|' + join($t,'+') + '|' + $
		For each $i in split($l,$)
			For $j = 0 to ($d^)-1
				$ = ' ' + split($i,'&')[$j] + ' '
				$p = $t[$j]
				while ($p^)<($^)
					$p = $p + '-'
				Loop
				while ($p^)>($^)
					$ = right(' '+$+' ',($p^)),' ' + $,$ + ' '
					$ = $[instr("><",substr($d,$j+1,1))]
				Loop
				$t[$j] = $p
				$r = $r + '|' + $ 
			Next
			
			$r = $r + '|'+@crlf + $x
			$x = @
			$cif = $r + $c
EndFunction

;!
;!
; end KiXgolfUDF
_________________________
!

download KiXnet

Top
#191523 - 2008-12-30 10:43 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
talk about christmas...
_________________________
!

download KiXnet

Top
#191524 - 2008-12-30 10:45 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, this wine bottle is empty too...
I think I'll hit the sack.
_________________________
!

download KiXnet

Top
#191525 - 2008-12-30 10:50 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
I've had my limit of famous grouse too...

I'll look into it again tomorrow, and see if I can shorten my Latin Squares code with the current findings too ;\)
_________________________
The Code is out there

Top
#191526 - 2008-12-30 10:50 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
You guys have a real talent... Too bad there no real $$$ in it. ;\)
Top
#191528 - 2008-12-31 12:46 AM Re: KiXgolf: Instruens Fabulam - public round [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, here is again easy one to crack. anyone?

379

 Code:
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x

	For $k = 0 to 1
		$ = @crlf
		$c='@' + join($t,'-') + '@'
		$r = $c + $
		$x = '|' + join($t,'+') + '|' + $
		For each $i in split($l,$)
			For $j = 0 to ($d^)-1
				$ = ' ' + split($i,'&')[$j] + ' '
				$p = $t[$j]
				while ($p^)<($^)
					$p = $p + '-'
				Loop
				while ($p^)>($^)
					$ = $ + ' ',right(' '+$+' ',($p^)),' ' + $
					$ = $[asc(substr($d,$j+1))-60]
				Loop
				$t[$j] = $p
				$r = $r + '|' + $ 
			Next			
			$r = $r + '|'+@crlf + $x
			$x = @
			$cif = $r + $c
EndFunction
_________________________
!

download KiXnet

Top
#191529 - 2008-12-31 01:23 AM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
a cheap one...

378

 Code:
Function CIF($d, $l)
Dim $, $c, $i, $j, $p, $k, $r, $t[($d^)-1],$x

	For $k = 0 to 1
		$ = @crlf
		$c='@' + join($t,'-') + '@'
		$r = $c + $
		$x = '|' + join($t,'+') + '|' + $
		For each $i in split($l,$)
			For $j = 0 to ($d^)-1
				$ = ' ' + split($i,'&')[$j] + ' '
				$p = $t[$j]
				while ($p^)<($^)
					$p = $p + '-'
				Loop
				while ($p^)>($^)
					$ = $ + ' ',right(' '+$+' ',$p^0),' ' + $
					$ = $[asc(substr($d,$j+1))-60]
				Loop
				$t[$j] = $p
				$r = $r + '|' + $ 
			Next			
			$r = $r + '|'+@crlf + $x
			$x = @
			$cif = $r + $c
EndFunction
_________________________
!

download KiXnet

Top
#191530 - 2008-12-31 09:45 AM Re: KiXgolf: Instruens Fabulam - public round [Re: Lonkero]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
 Originally Posted By: Lonkero
just wonder where richie boy went.


Unfortunately I don't get time to golf much anymore - it was quiet before Christmas so I managed to get in a private round but that's about it for me.

The latest hole did inspire me to produce a Sudoku solver though (converted from some else's algorithm) which was a bit of a giggle. If I get time to produce a friendly front end I'll post the code.

Top
#191534 - 2008-12-31 03:12 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Richard H.]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
I first though about using the standard 9x9 Sudoku but there are a couple of Sudokus that are extremely hard for computers to solve, at least in the context of a KiXgolf. Take a look at the following 17-hint Sudokus and see whether your algorithm can solve them: http://people.csse.uwa.edu.au/gordon/sudokumin.php

Most of the online Sudodu solvers fail on these thus indicating that their described algorithms are incomplete.
_________________________
There are two types of vessels, submarines and targets.

Top
#191548 - 2009-01-02 10:33 AM Re: KiXgolf: Instruens Fabulam - public round [Re: Sealeopard]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
It's not my algorithm, I pinched it from someone else.

It will always solve the Sudoku as it is a very simple brute force technique. It may however take a very very long time \:\)

I nicked it because I wanted a way to quickly generate a new filled grid to use in a Sudoku puzzle. The funny thing is that the completely random grid generator that I had already coded is actually faster most times

Top
#191552 - 2009-01-02 12:20 PM Re: KiXgolf: Instruens Fabulam - public round [Re: Richard H.]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
guys, you are kinda discussing this in the wrong thread...
_________________________
!

download KiXnet

Top
Page 3 of 4 <1234>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 370 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.164 seconds in which 0.103 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org