1
Name:
Anonymous
2010-11-20 18:25
I'm solving a sliding puzzle with BFS, and I'd like to practice doing things functionally. Any tips for layout and representation?
I'm storing the board state as an array of strings, one for each row, but the blocks can be of different sizes (1x1, 1x2, 2x1 and 2x2), which makes the code for moving a block pretty ugly.
2
Name:
Anonymous
2010-11-20 18:27
What the fuck is BFS and why are you assuming I will bother looking it up, ``faggot'' .
3
Name:
Anonymous
2010-11-20 18:29
>>2
You are clearly not a programmer. Go away.
4
Name:
Anonymous
2010-11-20 18:34
>>3
I know what
breadth-first search is, yet I still have absolutely no idea what ``BFS'' could possibly mean. Perhaps you shouldn't use acronyms for these kinds of things.
5
Name:
Anonymous
2010-11-27 17:20
6
Name:
Anonymous
2011-02-03 7:53
<
7
Name:
Anonymous
2013-01-19 23:21
/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.
8
Name:
Anonymous
2013-08-31 22:45
_,,.. -‐─- 、..,,_
_「ヽ┐'" ,. -─- 、..,,_ `'ヽ.
rヘ:::ヽ::>'"´ ̄ ̄`"''- 、`' 、 ':,
`ア、/ / `ヽ.'; ',
/ / / / /i , 、 '! i
ノ / /|,ゝ!、/ ,' ハ i i i |
^ヽ/,ハ ! ト |'〈 /,ァ;-='ニ、ハ |. i |
_____くソ ,!,,' ゝ' ` ト ハ .|__,| | | __ ,. -‐-、
,. '"´ ̄ヽ く/,ハ. _'__ ゝ-'' / /__!,/ irソ´ [C] |
!/´と_,.┴∠_,//ゝ、 !'´ `ヽ ",イ>'"´r'/ / _「,. -‐'、
/X゜/ i. └!、 ./i>r--'‐ァ"/ r'7i ン ,〈、_______ノ
.〈\/ ヽ、.,_ `"'r/_ノ>く_,ゝ:::イ Yj 〈.,____,.ヘ、ー--ン
`'´  ̄ ´/::::::::7o´ヽ、,_ゝ、ニ二_!ンァ、.,___,,..>-''
く::::::::/o::::::::::::::::::Y^' ー ''" ___
_,r'7`':::ー-r`へ/、::::::::::::::::::::::! ,. '"´ `ヽ.
|_l::c::::::::::/::::::::::`T'':::ー-rヘ. / i
iヽ::::::::/::::::::::::::::::::!:::::::::::';::::', ./ /
`rヘ:::::::::::::::/:::::::::::::::::::::::::::::::::',/ /
`k>:、;::/__:::::::::::::i::::::::::::::::::::i_____,,,... - ''"´
/ ヽ.,__ンー、!二7ニr-ァ、.,__::::;ゝ、
.rヘ、__/ //ヽ、___,.r7ー'´
/'ゝ、,ン ´ ヽ、___〉、
!、__/ ヽ.,__ノ
9
Name:
Anonymous
2013-09-01 0:16
,..-─-、
,:'>--:::::::':.,
/:::::::::::=ニ二\
;:::、:::::::::__;;;:::-<ム 何やらわからぬが
;'-‐,> ''"´ ̄ ̄`゙'' 、
{/ ヽ ヽ、 お主は我の事を
,. -‐/ ./ { } ハ ':,
/ / ./ ; ,ハ ,ハノイ } `ァ ウ ス イ ホ ン
{ ∠; ; l. `メ _ ',. , 'xァ=t、/ r'´ 有珠異本とやらに
ノ / {. ! /.ァ7示 }/ {r リハ /
( / ' ∨ l{八r_ソ . `"´,,{イハ 書き記すつもりだな?
, ' ∧ { \"" , --、 ,ム }
./ /l人 '、 `ヽ、 、 ノ ,.イハ / そうであろう?
; / ヽ{ /`'=‐、 ハ` ー-r'i´}/ }/
{ '、 / ∨、ー-v'-}ト、
\ ヽ./ } ; ー=ム' {\ __
`' ァ' | } ,:'´:::::`:; ⊂二 ヽ
./ } ' '、::::::::::ノ '、ニニ ':,- 、
/ - 、 /l} `""´ |ヽ.,_ }} ヽ
/  ̄`゙' 、.// ,:'"゙ヽ. | | `|| ',
{ \{. '、;;_;;ノ , .; || }、
/}` 、 ヽ ∨ヽ. リ ; \
10
Name:
Anonymous
2013-09-01 1:48
__,,,......,,__
_r‐i´ ̄こ7´ー-r-、_ `"' 、
r7>'"´`"'' ー<_/ `/!. ` 、
/ ./ `'<_/ ̄! ヽ
/ ! ! ハ `ヽ./´i. ';
'、 ヽ、ヘ. _/_,.イ´ ! V´ ヽ ! ○
\`ヽ. V 'ァー-、! /! ; \-' |
)ヽ、),!' ;´! V .! / /'  ̄` ! ゚
o ´⌒r '´ り ,ノ レ'i/'ヽ i |
.i ´ iメ)ソ ', ',
。 ,.ヘ ;ー-、 "' )ノ( i ヽ. o
/ (. \、 _j ,iハノ! ,! ハ ';
! ノ)メ.)`、__,,.. イメノ !,ハ / ! '; ノ
(へ,. -r'ァ-=i\ (ハノ !`'r-'-!‐‐ァ'、,. ヘ( ○
/ ,「/:::::::'、 ヽ!メ)レ' i:::::::!/i `ヽ、`
, ' !7:::::::;' \/}>!く{i::::::::',´i \
/gic !'::::::::'ー--/ ハ/!-':::::::::::::V `ヽ.
く ,. - 、.;'::::::::::::::::/ r-i/:::::::::::::::::::! Red >
// 、ヽ、i、::::::::::::::レ'´ヽ、」:::::::::::::: ;ハ 、 /\
.// 、ヽ.\ノ):::::::::::::::::::!/:::::::::::::::::::イヘ! `ソ ';
;'/ rゝソ'´i:::::::::::::::::::::::'::::::::::::::::::::::::!ハ__,,.. イ\,,.. -‐ ノ
11
Name:
Anonymous
2013-09-01 3:18
ト 、..,,_,,.. --─- 、.,_ __ノ)
,> ''"´ ` <,
/ _,,.. -- 、,_ i⌒ 、_ ヽ.
<., ァ'"´/ `メ、_ソ ハ
/ ./ / ,ハ / / \`ー--、
| | , 、メ、| ./| ,∠.,_ / Y | \
ノ .|/| |>rレ' |/__|/ | 八 ',
'⌒ヽ /.人弋_ソ ´ |ノ ̄「| ,! ,> !
//∨ '7// , 弋_ソ/ /| ! |
/ 〈 人 //∠, イ./ / !
.| )ヘ、 |>,、 丶 ,,. イ / ./ /|
'、 \/,}_|.l `T7ア「/`゙'ーrァ、,ヘ( / ! _
\ /{_| |` ./ / /7 \ ` / ., '"´ `ヽ.
,>ー''〈 .}_| l _.|/ /_」 / \´ )/ _ -r─rハ
./ Y_},( `⌒) / /_」 i/ , ´Y´ l \__弋.りノ!
/ /| \/\_/_/ // !.__人 ノ
'、 /)、 i \ /´ | `'' ー--‐<,
\ r/ ./ ,ハ ('). `/ ハ )