• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:00
CET 14:00
KST 22:00
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
2026 KongFu Cup Announcement3BGE Stara Zagora 2026 cancelled12Blizzard Classic Cup - Tastosis announced as captains15Weekly Cups (March 2-8): ByuN overcomes PvT block4GSL CK - New online series18
StarCraft 2
General
BGE Stara Zagora 2026 cancelled Blizzard Classic Cup - Tastosis announced as captains BGE Stara Zagora 2026 announced ByuL: The Forgotten Master of ZvT Terran AddOns placement
Tourneys
RSL Season 4 announced for March-April PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) Sparkling Tuna Cup - Weekly Open Tournament 2026 KongFu Cup Announcement [GSL CK] Team Maru vs. Team herO
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 516 Specter of Death Mutation # 515 Together Forever Mutation # 514 Ulnar New Year
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ BSL 22 Map Contest — Submissions OPEN to March 10 ASL21 General Discussion Are you ready for ASL 21? Hype VIDEO Gypsy to Korea
Tourneys
[Megathread] Daily Proleagues [BSL22] Open Qualifiers & Ladder Tours IPSL Spring 2026 is here! ASL Season 21 Qualifiers March 7-8
Strategy
Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Zealot bombing is no longer popular?
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Nintendo Switch Thread PC Games Sales Thread No Man's Sky (PS4 and PC)
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia TL Mafia Community Thread
Community
General
Mexico's Drug War US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine NASA and the Private Sector
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! [Req][Books] Good Fantasy/SciFi books
Sports
Formula 1 Discussion 2024 - 2026 Football Thread General nutrition recommendations Cricket [SPORT] TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2449 users

The Big Programming Thread - Page 1005

Forum Index > General Forum
Post a Reply
Prev 1 1003 1004 1005 1006 1007 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-04-24 19:51:10
April 24 2019 18:55 GMT
#20081
I have an assignment for my AI class, part of the assignment is doing english to first order logic to CNF

Here are the english statements:

1.) For every positive integer, there is a larger positive integer.
2.) 1 is the smallest positive integer
3.) There are at least two distinct positive integers

And they provided established predicates:
PosInt(x) - indicates x is a positive integer
LessThan(x,y) - indicates than x is less than y
Equals(x,y) - indicates that the value of x equals the value of y


I would like to check if this is correct... at all...honestly the lecture and notes do a horrible job explaining how to do this

FOL:

1.) for all x, exists y(PosInt(x) --> PosInt(y)(LessThan(x,y))

2.) for all x(PosInt(x) ----> !LessThan(x,1))

3.) for all x, exists y(PosInt(x) ----> !Equals(x,y))


I guess I'll stop here for now, and worry about CNF if that is actually correct
AKnopf
Profile Blog Joined March 2011
Germany259 Posts
Last Edited: 2019-04-24 19:52:26
April 24 2019 19:47 GMT
#20082
Hey travis,

1) In your first example you are missing a closing bracket. You should also use an AND between "PosInt(y)" and "(LessThan(x,y)"

2) Technically, what you are saying is: "There is no positive integer that is smaller than 1". I assume you can assume it is proven that this means, that 1 is the smallest one, but I don't know how nitpicky your prof or tutor is. To be extra safe I would use a combination of NOT and EXISTS

3) Technically you are saying: "For every positive integer, there is at least one different positive integer". This is more than what was asked for. And again, you can assume that it is proven that one follows the other, mathematically. But if this is an excercise in using logic to model english sentences, than your answer is not correct. Two EXISTS should suffice here.


Also you wrote "Equals(x,y) - indicates that the value of x is less than the value of y". I hope this is a copy&paste error on your side. Otherwise, your prof or tutor is an ass.

I hope this could help you. I didn't want to go too far not to break the "Do my homework" rule.
Cheers!

Edit: Also your notation was a little strange to me. Is this how they teach you notation?
The world - its a funny place
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-04-24 21:07:26
April 24 2019 20:03 GMT
#20083
Other than using english instead of qualifiers the notation seems to be the same as is posted in our notes.

For #1, I see what you are saying.
What about:

for all x, exists y(PosInt(x) ----> LessThan(x,PosInt(y)))

can I do that?


2.) yeah I saw that technicality. Hmm, not sure what to do then though


3.) are you saying to just do:

exists x, exists y(PosInt(x) ----> !Equals(x,y)) ?

If so, that makes sense to me


I wouldn't worry too much about the no homework rule, I'm not here to get free answers, just to understand things. It's tough when you live far from the school I think. I don't have any friends in my classes and it can be hard to go to office hours.

Also, fixed the error. Thank you!



EDIT: Actually, for #3, can I just do exists x, exists y, !Equals(PosInt(x),PosInt(y)) ?
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
Last Edited: 2019-04-24 21:45:58
April 24 2019 21:43 GMT
#20084
Predicates arent nestable like that. What he meant was:

for all x, exists y(PosInt(x) ----> (PosInt(y) AND LessThan(x,y)))

Yes your edit for #3 works if you dont nest the predicates but use an AND
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
Acrofales
Profile Joined August 2010
Spain18234 Posts
April 25 2019 07:09 GMT
#20085
I think #2 is fine.
Uldridge
Profile Blog Joined January 2011
Belgium5059 Posts
Last Edited: 2019-05-01 15:37:40
May 01 2019 15:36 GMT
#20086
I'm making a scraper that tries to look at the big supermarkets in my country and download the images with the product name as the file name.
Initially it worked fine. I worked on my script and I did 2 supermarkets without too much problems. Then I tried another one and I couldn't access the html blocks in the main class, while other chunks were still accessible (on the same page)

Here's where I have to admit something: I don't know much about the rules and ethics. For instance, I just found out there's a robots.txt file for many (if not almost all) websites and see that the specific page and everything after it is blocked. However, I can and am still going to the page, but I can't see all the elements. Are those elements the only ones being given up 'for free' if I ignore the site's guidelines anyway. I don't really know what's going on. Is there a way to make me seem human and still get access? I don't want to slow anything down, I've learned you need to put pauses in your requests, but I feel like it would be an enormous waste of product info if I can't get those products from that specific site lol

By the way: this project is for personal use (would love to know all the products that are gluten free so my girlfriend who suffers from coeliac disease doesn't need to endlessly look at every product's ingredients etc).
Taxes are for Terrans
tofucake
Profile Blog Joined October 2009
Hyrule19194 Posts
May 01 2019 20:06 GMT
#20087
If you are ignoring robots.txt you're a terrible person by definition.

Anyway, if stuff is being loaded dynamically (e.g. by js libraries loading stuff asynchronously) and your scraper doesn't do that, you won't get that information.
Liquipediaasante sana squash banana
shz
Profile Blog Joined October 2010
Germany2687 Posts
May 01 2019 23:18 GMT
#20088
You could try a headless browser like puppeteer.
Liquipedia
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2019-05-02 15:26:01
May 02 2019 15:12 GMT
#20089
--- Nuked ---
Uldridge
Profile Blog Joined January 2011
Belgium5059 Posts
May 02 2019 16:37 GMT
#20090
Thanks for the replies, I'm an absolute noob trying to do and learn along the way.
I'm using the requests and requests HTLM library for python.

I'll look into puppeteer, but that might be above me already lol
Taxes are for Terrans
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2019-05-02 19:40:30
May 02 2019 19:35 GMT
#20091
--- Nuked ---
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-05-04 23:29:40
May 04 2019 23:27 GMT
#20092
doing a project for a class

in the code the comments says this:

Parameters:
box_target : (tensor) size (-1, 5)
box_pred : (tensor) size (-1, 5)



What does this mean??
I've seen it before and it's generally just like a 5 index array I think. I just don't actually know wtf the -1 does to the shape.
Neshapotamus
Profile Blog Joined May 2006
United States163 Posts
May 05 2019 02:49 GMT
#20093
On May 05 2019 08:27 travis wrote:
doing a project for a class

in the code the comments says this:

Parameters:
box_target : (tensor) size (-1, 5)
box_pred : (tensor) size (-1, 5)



What does this mean??
I've seen it before and it's generally just like a 5 index array I think. I just don't actually know wtf the -1 does to the shape.


Probably means it can be any size. What framework are you working in?
zatic
Profile Blog Joined September 2007
Zurich15363 Posts
May 05 2019 06:33 GMT
#20094
https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.reshape.html

One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions.
ModeratorI know Teamliquid is known as a massive building
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-05-07 19:36:33
May 07 2019 19:14 GMT
#20095
Anyone here have experience using YOLO object detector?

It's my current class project and we are supposed to basically fill in the missing code, but I feel like the code makes no sense and the hints make no sense.

It's this if anyone understands and can take a look at it.

http://slazebni.cs.illinois.edu/fall18/assignment3_part2.html


(we are supposed to implement yolo_loss.py)



I am mostly confused at the part where we are supposed to compute the IOU
the shapes don't make any sense to me... and I can't tell what I am finding the "max IOU" of. It says "of the two boxes". But of what two boxes, the two boxes per grid cell? If I am doing that then why are the tensors shaped in a way that is completely counterproductive to that?


It doesn't help that all the "hints" are broken english. This is by far the most frustrating assignment I have been given. I kind of want to just ignore all the hints and directions and implement it the way I want.
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
May 10 2019 15:10 GMT
#20096
Anyone here been to the VS Live events? I might be able to go this year, curious if they're worth the time.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
May 11 2019 23:23 GMT
#20097
I want to ask a few questions here about LSTMs. Is anyone here familiar with recurrent networks? The discussion may not need to be on LSTMs in particular.
Neneu
Profile Joined September 2010
Norway492 Posts
May 13 2019 08:22 GMT
#20098
What are you wondering about? I'm no expert on it, but I have been applying it quite a lot in custom named entity recognition and sentence classification in the last 8 month at work.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
May 13 2019 11:59 GMT
#20099
I have some confusion about how the recurrent part of the model actually transfers information from one state to the next

Say we have a LSTM layer of a network, that takes in an input of size X, outputs size Y
During training or prediction, what does the first iteration do? It takes in input X but what about the input from the LSTM itself? Is that initialized as all zeros?

Also, the recurrent part of the lstm is a single vector that keeps something akin to a memory input of previous outputs, is that right? But how does that work when the input to the LSTM is discrete values that correspond to labels (like, types of things). Are all of the last K steps are somehow stored in a single vector of a size that does not change? How does that information get combined into a single vector without completely screwing up what the inputs mean?

Or is it actually stored in a 3d tensor which starts as zeros and one of the dimensions corresponds to number of remembered iterations? Thanks

I've tried to watch some videos on LSTMs but they don't really go into that.

I ask because I am trying to understand how alphastar would be using an LSTM, because they must be using it for either the entire sequence of the game or for a very long sequence, because otherwise it seems useless. But... I don't really understand how.
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
May 14 2019 16:08 GMT
#20100
I've got this MS SQL script that I can't figure out. See below (generalized):
merge TableTarget TGT
using (
select * from TableSource
) as SRC
on TGT.ColumnA = SRC.ColumnA
when matched and exists (
select SRC.ColulmnB, SRC.ColumnC
except
select TGT.ColumnB, TGT.ColumnC
)
then update ...
when not matched by target then insert ...

I don't know what "when matched and exists" means, nor what the "except" statement means. I know what they mean generally speaking, and I know what a merge statement is, but in this context I can't figure out what they're trying to do. Any help would be appreciated.
Prev 1 1003 1004 1005 1006 1007 1032 Next
Please log in or register to reply.
Live Events Refresh
WardiTV Team League
12:00
Group B
WardiTV369
IntoTheiNu 1
Liquipedia
RSL Revival
10:00
Season 4: Group D
ByuN vs SHIN
Maru vs Krystianer
Tasteless1288
IndyStarCraft 246
Rex155
LiquipediaDiscussion
Sparkling Tuna Cup
10:00
Weekly #123
Classic vs CreatorLIVE!
CranKy Ducklings84
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Tasteless 1288
IndyStarCraft 246
Rex 155
StarCraft: Brood War
Sea 52416
Calm 11803
firebathero 3394
Horang2 2179
GuemChi 1887
Jaedong 1574
BeSt 386
Mini 310
EffOrt 300
Stork 238
[ Show more ]
Last 234
Rush 229
Soma 211
actioN 204
Mind 79
Dewaltoss 76
ToSsGirL 68
Sea.KH 53
Backho 49
Hm[arnc] 47
Barracks 40
sorry 38
JulyZerg 35
IntoTheRainbow 31
GoRush 17
ivOry 13
Nal_rA 11
SilentControl 9
Icarus 7
Terrorterran 1
Dota 2
Gorgc5715
XaKoH 263
canceldota97
BananaSlamJamma4
Counter-Strike
byalli562
x6flipin328
zeus298
edward64
Super Smash Bros
Mew2King102
Heroes of the Storm
Khaldor283
MindelVK8
Other Games
B2W.Neo1839
Liquid`RaSZi547
Fuzer 175
Organizations
Dota 2
PGL Dota 2 - Main Stream20928
Other Games
gamesdonequick848
ComeBackTV 268
StarCraft: Brood War
lovetv 20
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• 3DClanTV 85
• musti20045 13
• Adnapsc2 10
• CranKy Ducklings SOOP6
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• blackmanpl 10
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 1477
Upcoming Events
Patches Events
4h
BSL
7h
GSL
19h
Wardi Open
23h
Monday Night Weeklies
1d 4h
WardiTV Team League
1d 23h
PiGosaur Cup
2 days
Kung Fu Cup
2 days
OSC
3 days
The PondCast
3 days
[ Show More ]
KCM Race Survival
3 days
WardiTV Team League
3 days
Replay Cast
4 days
KCM Race Survival
4 days
WardiTV Team League
4 days
Korean StarCraft League
5 days
uThermal 2v2 Circuit
6 days
BSL
6 days
Liquipedia Results

Completed

Proleague 2026-03-13
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
BSL Season 22
RSL Revival: Season 4
Nations Cup 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

CSL Elite League 2026
ASL Season 21
Acropolis #4 - TS6
2026 Changsha Offline CUP
Acropolis #4
IPSL Spring 2026
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
NationLESS Cup
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.