[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.4394722 [View]
File: 104 KB, 400x400, 1329869832662.jpg [View same] [iqdb] [saucenao] [google]
4394722

>>4394717

What's your faggy major?

>> No.4389997 [View]
File: 104 KB, 400x400, hasanyone.jpg [View same] [iqdb] [saucenao] [google]
4389997

>>4389995

>> No.4155716 [View]
File: 104 KB, 400x400, hasanyone.jpg [View same] [iqdb] [saucenao] [google]
4155716

>projectile
>light
wat

>> No.3445030 [View]
File: 104 KB, 400x400, philosoraptor_has_anyone_really_been_as_far_as_decided_to_use_even_go_want_to_do_look_more_like_Funny_Pics_Folder-s400x400-142821.jpg [View same] [iqdb] [saucenao] [google]
3445030

What is the point of a debt ceiling if it is always raised?

>> No.2986731 [View]
File: 104 KB, 400x400, 125912377430.jpg [View same] [iqdb] [saucenao] [google]
2986731

Epigenetics

>> No.2680167 [View]
File: 104 KB, 400x400, 1269828311497.jpg [View same] [iqdb] [saucenao] [google]
2680167

hey /sci/ I'm doing a C++ course this semester and I knew a lil java so I decided to ditch the curriculum of hell-world and try some intermediate shit. I've designed a program that plays tic tac toe against a computer and was wondering if anyone can beat it.

it follows the normal tic tac toe rules.

the computer decides its move by calculating each available slot and choosing the greatest value.

a blank space has a value of 5
a square it has marked itself has a value of 10
a square the player has marked has a value of -10

it multiplies the two other squares in its row for each row separately. adds the results together. then multiplies that figure by the amount of lines that spot can win with i.e. corner = 3, top middle = 2 or center = 4.

for example

|X|
----------
O| |A
----------
| |B


[ ] denotes blank space.

it starts with the top left corner, and evaluates every open spot.

the way it evaluates A is:

[ ] * O = 5 * -10 = -50
[ ] * [ ] = 5 * 5 = 25

-50 + 25 * 2 = -50

the way B would be evaluated is:

[ ] * [ ] = 25

[ ] * [ ] = 25

[ ] * [ ] = 25

75 * 3 = 225

I hope you get the idea.

the numbers have been set with a purpose. when a row has 2 of the opponents marks, it will return the greatest positive value to avoid losing.

also each slot has a modifier that adds 1-9 to differentiate two equally valued squares. they're value added is respective to their slot number i.e. top left = 0 next is 1.

I realize I could do it simpler but it's also about the ability to expand the program.

also some feedback on my logical skills would be cool too. thanks...

inb4 hurr durrr OP thinks he's rainmain.

>> No.1993592 [View]
File: 104 KB, 400x400, 1250347364322.jpg [View same] [iqdb] [saucenao] [google]
1993592

This thread

>> No.1384975 [View]
File: 104 KB, 400x400, 1273294359030.jpg [View same] [iqdb] [saucenao] [google]
1384975

>>1384957>>1384951

Give me a break, I was working on things you can even comprehend long before your people even came down from the trees.

>> No.1009650 [View]
File: 104 KB, 400x400, Philosoraptor_-_has_anyone_really_been_as_far_as_decided_to_use_even_go_want_to_do_look_more_like.jpg [View same] [iqdb] [saucenao] [google]
1009650

Has anyone really been as far as decided to use even go want to do look more like.

>> No.1009640 [DELETED]  [View]
File: 104 KB, 400x400, Philosoraptor_-_has_anyone_really_been_as_far_as_decided_to_use_even_go_want_to_do_look_more_like.jpg [View same] [iqdb] [saucenao] [google]
1009640

Has anyone really been as far as decided to use even go want to do look more like.

Navigation
View posts[+24][+48][+96]